/*
Theme Name: LLM Watch Engadget
Theme URI: https://www.llmwatch.ai/
Author: LLM Watch
Description: Tech-news theme inspired by Engadget — dark masthead, green accent, hero + story rail.
Version: 1.1.0
Text Domain: llmwatch-engadget
Requires at least: 6.0
Requires PHP: 8.0
*/

:root {
  --lw-bg: #f4f5f7;
  --lw-surface: #ffffff;
  --lw-ink: #111111;
  --lw-muted: #5c6570;
  --lw-line: #e2e5ea;
  --lw-header: #0b0d10;
  --lw-header-2: #151920;
  --lw-accent: #00b562;
  --lw-accent-2: #00d67a;
  --lw-danger: #ff4d4f;
  --lw-radius: 10px;
  --lw-shadow: 0 12px 40px rgba(11, 13, 16, 0.12);
  --lw-font: "Source Sans 3", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --lw-display: "Space Grotesk", "Source Sans 3", sans-serif;
  --lw-max: 1180px;
  --lw-tap: 44px;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}
body {
  margin: 0;
  font-family: var(--lw-font);
  font-size: 1rem;
  color: var(--lw-ink);
  background: var(--lw-bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--lw-accent); }
img, video, svg { max-width: 100%; height: auto; display: block; }
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

.lw-wrap { width: min(100% - 1.5rem, var(--lw-max)); margin-inline: auto; }

/* Top utility — mobile base */
.lw-topbar {
  background: #050607;
  color: #aeb6c2;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}
.lw-topbar .lw-wrap {
  display: flex; justify-content: space-between; align-items: center;
  min-height: 34px; gap: 0.75rem;
}
.lw-topbar .lw-wrap > div:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lw-topbar a {
  color: #c9d0d8;
  display: inline-flex;
  align-items: center;
  min-height: var(--lw-tap);
}
.lw-topbar a:hover { color: var(--lw-accent-2); }

/* Header — mobile: logo + hamburger, search full-width, nav drawer */
.lw-header {
  background: linear-gradient(180deg, var(--lw-header) 0%, var(--lw-header-2) 100%);
  color: #fff;
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(8px);
}
.lw-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 0.75rem;
  min-height: 56px;
  padding: 0.55rem 0;
  position: relative;
}
.lw-logo {
  font-family: var(--lw-display);
  font-weight: 700;
  font-size: clamp(1.25rem, 5vw, 1.55rem);
  letter-spacing: -0.04em;
  color: #fff !important;
  display: inline-flex;
  align-items: center;
  gap: 0.15em;
  min-height: var(--lw-tap);
  min-width: 0;
  flex: 1 1 auto;
}
.lw-logo span { color: var(--lw-accent-2); }

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--lw-tap);
  min-width: var(--lw-tap);
  padding: 0.4rem 0.85rem;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  flex: 0 0 auto;
}

.lw-nav {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 1rem;
  font-weight: 600;
  flex: 1 1 100%;
  order: 4;
  flex-direction: column;
  gap: 0;
  background: var(--lw-header-2);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--lw-radius);
  width: 100%;
}
.lw-header-inner.is-open .lw-nav { display: flex; }
.lw-nav a {
  color: #d7dde5;
  display: flex;
  align-items: center;
  min-height: var(--lw-tap);
  padding: 0.65rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.lw-nav li:last-child a { border-bottom: 0; }
.lw-nav a:hover,
.lw-nav .current-menu-item > a { color: #fff; }
.lw-nav a::after { display: none; }

.lw-search {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 0.2rem 0.85rem;
  flex: 1 1 100%;
  order: 3;
  min-width: 0;
  min-height: var(--lw-tap);
}
.lw-search input {
  background: transparent;
  border: 0;
  color: #fff;
  width: 100%;
  min-width: 0;
  font: inherit;
  font-size: 1rem;
  outline: none;
  min-height: calc(var(--lw-tap) - 4px);
}
.lw-search input::placeholder { color: #8b95a3; }

/* Hero — single column, modest height on small screens */
.lw-hero { padding: 1.1rem 0 0.35rem; }
.lw-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.lw-feature {
  position: relative;
  overflow: hidden;
  border-radius: var(--lw-radius);
  background: #111;
  min-height: 240px;
  aspect-ratio: 16 / 11;
  box-shadow: var(--lw-shadow);
  isolation: isolate;
}
.lw-feature img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  transform: scale(1.02);
  transition: transform .7s ease;
}
.lw-feature:hover img { transform: scale(1.06); }
.lw-feature-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,.88) 100%);
}
.lw-feature-body {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1.1rem 1.15rem 1.25rem;
  color: #fff; z-index: 1;
}
.lw-kicker {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--lw-accent-2);
  margin-bottom: 0.45rem;
}
.lw-feature h2 {
  margin: 0 0 0.45rem;
  font-family: var(--lw-display);
  font-size: clamp(1.35rem, 5.5vw, 1.85rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 700;
}
.lw-feature p {
  margin: 0;
  color: #cfd5dd;
  max-width: 42rem;
  font-size: 0.95rem;
}

.lw-rail {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.lw-rail-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 0.75rem;
  background: var(--lw-surface);
  border: 1px solid var(--lw-line);
  border-radius: var(--lw-radius);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}
.lw-rail-card:hover { transform: translateY(-2px); box-shadow: var(--lw-shadow); }
.lw-rail-card img {
  width: 96px;
  height: 100%;
  min-height: 88px;
  object-fit: cover;
}
.lw-rail-card .body { padding: 0.65rem 0.75rem 0.7rem; min-width: 0; }
.lw-rail-card h3 {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.3;
  font-family: var(--lw-display);
  letter-spacing: -0.02em;
}

/* Sections */
.lw-section { padding: 1.35rem 0 1.75rem; }
.lw-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
  border-bottom: 2px solid var(--lw-ink);
  padding-bottom: 0.4rem;
}
.lw-section-head h2 {
  margin: 0;
  font-family: var(--lw-display);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.lw-section-head a {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--lw-accent);
  min-height: var(--lw-tap);
  display: inline-flex;
  align-items: center;
}

.lw-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.lw-card {
  background: var(--lw-surface);
  border: 1px solid var(--lw-line);
  border-radius: var(--lw-radius);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
  animation: lw-rise .55s ease both;
}
.lw-card:nth-child(2) { animation-delay: .06s; }
.lw-card:nth-child(3) { animation-delay: .12s; }
.lw-card:hover { transform: translateY(-3px); box-shadow: var(--lw-shadow); }
.lw-card-media {
  aspect-ratio: 16 / 10;
  background: #d9dee6;
  overflow: hidden;
}
.lw-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.lw-card:hover .lw-card-media img { transform: scale(1.04); }
.lw-card-body { padding: 0.95rem 1rem 1.1rem; }
.lw-card h3 {
  margin: 0.35rem 0 0.45rem;
  font-family: var(--lw-display);
  font-size: 1.1rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.lw-meta { color: var(--lw-muted); font-size: 0.8rem; }

/* Hub strip in theme (category chips) */
.lw-hubs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin: 0.5rem 0 1.25rem;
}
.lw-hub {
  background: var(--lw-header);
  color: #fff;
  border-radius: 8px;
  padding: 0.85rem 0.9rem;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  min-height: var(--lw-tap);
  transition: border-color .2s ease, transform .2s ease;
}
.lw-hub:hover { color: #fff; border-color: var(--lw-accent); transform: translateY(-2px); }
.lw-hub small { display: block; color: #8b95a3; font-weight: 500; margin-top: 0.2rem; }

/* Content */
.lw-main { padding: 1.5rem 0 2.5rem; }
.lw-article {
  background: var(--lw-surface);
  border: 1px solid var(--lw-line);
  border-radius: var(--lw-radius);
  padding: 1.15rem 1.1rem 1.4rem;
  max-width: 760px;
  margin: 0 auto;
}
.lw-article h1 {
  font-family: var(--lw-display);
  font-size: clamp(1.55rem, 6vw, 2.2rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0.4rem 0 1rem;
}
.lw-article .entry-content > *:first-child { margin-top: 0; }
.lw-article .entry-content p { font-size: 1.05rem; }
.lw-article .entry-content img {
  max-width: 100%;
  height: auto;
}
.lw-transparency {
  margin: 0 0 1.25rem;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--lw-accent);
  background: #eefbf4;
  font-size: 0.95rem;
}

/* Footer — stacked */
.lw-footer {
  background: var(--lw-header);
  color: #aeb6c2;
  padding: 2rem 0 1.75rem;
  margin-top: 1rem;
}
.lw-footer a {
  color: #d7dde5;
  display: inline-flex;
  align-items: center;
  min-height: var(--lw-tap);
}
.lw-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
.lw-footer h3 { color: #fff; margin: 0 0 0.65rem; font-size: 0.95rem; }
.lw-footer ul { list-style: none; margin: 0; padding: 0; }
.lw-footer li { margin: 0.15rem 0; }
.lw-copy {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.82rem;
}

@keyframes lw-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* —— Enhancements (min-width) —— */
@media (min-width: 600px) {
  .lw-wrap { width: min(100% - 2rem, var(--lw-max)); }
  .lw-feature {
    min-height: 320px;
    aspect-ratio: 16 / 10;
  }
  .lw-feature h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
  .lw-feature-body { padding: 1.35rem 1.4rem 1.5rem; }
  .lw-rail-card { grid-template-columns: 118px 1fr; gap: 0.85rem; }
  .lw-rail-card img { width: 118px; min-height: 92px; }
  .lw-cards { grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
  .lw-hubs { grid-template-columns: repeat(3, 1fr); }
  .lw-article { padding: clamp(1.25rem, 3vw, 2.25rem); }
  .lw-footer-grid { grid-template-columns: 1.4fr 1fr; }
}

@media (min-width: 900px) {
  .lw-header-inner {
    flex-wrap: nowrap;
    min-height: 72px;
    padding: 0;
    gap: 1.25rem;
  }
  .menu-toggle { display: none; }
  .lw-logo {
    flex: 0 0 auto;
    font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  }
  .lw-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    flex: 1 1 auto;
    order: unset;
    width: auto;
    gap: 0.15rem 1.1rem;
    background: transparent;
    border: 0;
    border-radius: 0;
    font-size: 0.92rem;
  }
  .lw-nav a {
    padding: 0.25rem 0;
    min-height: auto;
    border-bottom: 0;
  }
  .lw-nav a::after {
    content: "";
    display: block;
    height: 2px;
    width: 0;
    margin-top: 4px;
    background: var(--lw-accent);
    transition: width .25s ease;
  }
  .lw-nav a:hover::after,
  .lw-nav .current-menu-item > a::after { width: 100%; }
  .lw-search {
    flex: 0 1 200px;
    order: unset;
    min-width: 160px;
    padding: 0.35rem 0.75rem;
  }
  .lw-hero { padding: 1.75rem 0 0.5rem; }
  .lw-hero-grid {
    grid-template-columns: 1.45fr 1fr;
    gap: 1.25rem;
  }
  .lw-feature {
    min-height: 420px;
    aspect-ratio: auto;
  }
  .lw-feature h2 { font-size: clamp(1.6rem, 3vw, 2.35rem); }
  .lw-feature p { font-size: 1rem; }
  .lw-section { padding: 1.75rem 0 2.25rem; }
  .lw-section-head h2 { font-size: 1.25rem; }
  .lw-cards { grid-template-columns: repeat(3, 1fr); }
  .lw-hubs { grid-template-columns: repeat(6, 1fr); }
  .lw-card h3 { font-size: 1.15rem; }
  .lw-main { padding: 2rem 0 3rem; }
  .lw-article h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
  .lw-article .entry-content p { font-size: 1.08rem; }
  .lw-footer { padding: 2.5rem 0 2rem; }
  .lw-footer-grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 1.5rem; }
  .lw-copy { margin-top: 2rem; }
}

@media (min-width: 1200px) {
  .lw-search { flex-basis: 220px; min-width: 180px; }
  .lw-feature-body { padding: 1.5rem 1.6rem 1.7rem; }
}
