:root {
  --tn-bg: #0f0f12;
  --tn-surface: #18181b;
  --tn-surface-2: #1f1f23;
  --tn-surface-3: #27272a;
  --tn-border: #27272a;
  --tn-border-strong: #3f3f46;
  --tn-text: #e4e4e7;
  --tn-text-strong: #fafafa;
  --tn-text-muted: #a1a1aa;
  --tn-text-soft: #71717a;
  --tn-primary: #6366f1;
  --tn-primary-2: #7c3aed;
  --tn-primary-soft: #a78bfa;
  --tn-primary-soft-2: #c4b5fd;
  --tn-success: #86efac;
  --tn-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  --tn-radius: 14px;
  --tn-container: 1160px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  padding: 0 !important;
  margin: 0 !important;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--tn-bg);
  color: var(--tn-text);
  line-height: 1.6;
}

a {
  color: var(--tn-primary-soft);
  text-decoration: none;
}

a:hover {
  color: var(--tn-primary-soft-2);
}

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

iframe,
embed,
object {
  max-width: 100%;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-shell {
  min-height: 100vh;
}

.main {
  max-width: var(--tn-container);
  margin: 0 auto;
  padding: 1.5rem;
}

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.85rem 1.5rem;
  background: #18181b;
  border-bottom: 1px solid #27272a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.header-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: #fafafa;
  text-decoration: none;
  transition: opacity 0.2s;
}

.header-logo:hover {
  color: #fafafa;
  opacity: 0.9;
}

.header-logo-img {
  display: block;
  width: 115px;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.header-nav-main {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.header-nav-link {
  padding: 0.5rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  color: #a1a1aa;
  text-decoration: none;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.header-nav-link:hover {
  color: #fafafa;
  background: rgba(63, 63, 70, 0.5);
  text-decoration: none;
}

.header-nav-link.active {
  color: #e4e4e7;
  background: rgba(99, 102, 241, 0.15);
}

.header-nav-link.active:hover {
  color: #fafafa;
  background: rgba(99, 102, 241, 0.25);
}

.header-nav-ranking-wrap {
  position: relative;
}

.header-nav-ranking-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #a1a1aa;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  border-radius: 6px;
}

.header-nav-ranking-trigger:hover {
  color: #fafafa;
  background: rgba(63, 63, 70, 0.5);
}

.header-nav-ranking-trigger[aria-expanded="true"] {
  color: #e4e4e7;
  background: rgba(99, 102, 241, 0.15);
}

.header-nav-ranking-chevron {
  font-size: 0.55rem;
  opacity: 0.85;
  transition: transform 0.2s;
}

.header-nav-ranking-trigger[aria-expanded="true"] .header-nav-ranking-chevron {
  transform: rotate(180deg);
}

.header-nav-ranking-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  margin-top: 0.2rem;
  padding: 0.35rem 0;
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  z-index: 100;
}

.header-nav-ranking-dropdown[hidden] {
  display: none;
}

.header-nav-ranking-link {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #a1a1aa;
  text-decoration: none;
}

.header-nav-ranking-link:hover {
  background: rgba(63, 63, 70, 0.5);
  color: #fafafa;
}

.header-lang-auth {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.header-lang {
  display: flex;
  align-items: center;
}

.header-lang-select {
  padding: 0.4rem 2rem 0.4rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #e4e4e7;
  background: #27272a;
  border: 1px solid #3f3f46;
  border-radius: 8px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a1a1aa' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
}

.header-lang-select:hover {
  border-color: #52525b;
  color: #fafafa;
}

.header-lang-select:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}

.header-auth {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-auth a {
  color: #a1a1aa;
  text-decoration: none;
}

.header-auth a:hover {
  color: #fafafa;
  text-decoration: none;
}

.header-btn-login,
.search-submit,
.wp-block-search__button,
.home-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.4rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #7c3aed);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: filter 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.45);
}

.header-btn-login:hover,
.search-submit:hover,
.wp-block-search__button:hover,
.home-cta:hover {
  color: #fff;
  filter: brightness(1.1);
  text-decoration: none;
}

.header-user-menu {
  position: relative;
}

.header-user-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--tn-text-muted);
  background: none;
  border: none;
  padding: 0.4rem 0.5rem;
  cursor: pointer;
  font-family: inherit;
  border-radius: 6px;
}

.header-user-trigger:hover {
  color: var(--tn-text-strong);
  background: rgba(63, 63, 70, 0.5);
}

.header-user-trigger[aria-expanded="true"] {
  color: var(--tn-text-strong);
  background: rgba(63, 63, 70, 0.6);
}

.header-user-trigger-chevron {
  font-size: 0.6rem;
  opacity: 0.8;
  transition: transform 0.2s;
}

.header-user-trigger[aria-expanded="true"] .header-user-trigger-chevron {
  transform: rotate(180deg);
}

.header-user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.25rem;
  min-width: 200px;
  background: #18181b;
  border: 1px solid #3f3f46;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  padding: 0.35rem 0;
  z-index: 100;
}

.header-user-dropdown[hidden] {
  display: none;
}

.header-user-dropdown-link {
  display: block;
  width: 100%;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  color: #e4e4e7;
  text-decoration: none;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.header-user-dropdown-link:hover {
  background: rgba(63, 63, 70, 0.5);
  color: #fafafa;
  text-decoration: none;
}

.header-user-dropdown-sep {
  height: 1px;
  background: #3f3f46;
  margin: 0.35rem 0.5rem;
}

.header-user-dropdown-logout {
  color: #fca5a5;
}

.header-user-dropdown-logout:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #fecaca;
}

.header-menu-btn {
  display: none;
  margin-left: auto;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid #3f3f46;
  border-radius: 8px;
  background: #27272a;
  color: #e4e4e7;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}

.header-menu-btn:hover {
  background: #3f3f46;
  border-color: #52525b;
}

.header-secondary {
  background: #121217;
  border-bottom: 1px solid #27272a;
}

.header-secondary-inner {
  width: 100%;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-secondary-nav {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  flex: 1 1 auto;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
}

.header-secondary-nav::-webkit-scrollbar {
  display: none;
}

.header-secondary-nav.is-dragging {
  cursor: grabbing;
}

.header-secondary-menu {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: nowrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.header-secondary-menu .menu-item {
  margin: 0;
}

.header-secondary-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  color: #a1a1aa;
  font-size: 0.84rem;
  font-weight: 600;
  background: rgba(63, 63, 70, 0.3);
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease;
}

.header-secondary-link:hover,
.header-secondary-link.is-active,
.header-secondary-menu .current-menu-item > .header-secondary-link,
.header-secondary-menu .current-menu-ancestor > .header-secondary-link,
.header-secondary-menu .current_page_item > .header-secondary-link {
  color: #fafafa;
  background: rgba(99, 102, 241, 0.2);
}

.header-secondary-search {
  flex: 0 0 320px;
  max-width: 100%;
  position: relative;
}

.header-secondary-search .search-form {
  gap: 0.55rem;
  flex-wrap: nowrap;
}

.header-search-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid #3f3f46;
  border-radius: 10px;
  background: #27272a;
  color: #e4e4e7;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}

.header-search-toggle:hover {
  background: #3f3f46;
  border-color: #52525b;
}

.header-search-toggle-icon {
  position: relative;
  display: block;
  width: 0.95rem;
  height: 0.95rem;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.header-search-toggle-icon::after {
  content: "";
  position: absolute;
  right: -0.3rem;
  bottom: -0.22rem;
  width: 0.48rem;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transform: rotate(45deg);
  transform-origin: center;
}

.header-search-panel {
  width: 100%;
}

.header-secondary-search .search-field {
  width: 100%;
  min-width: 0;
  padding: 0.7rem 0.9rem;
  font-size: 0.9rem;
  border-radius: 10px;
}

.header-secondary-search .search-submit {
  padding: 0.7rem 0.95rem;
  white-space: nowrap;
}

.header-menu-icon,
.header-menu-icon::before,
.header-menu-icon::after {
  display: block;
  width: 1.2rem;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.header-menu-icon {
  position: relative;
  margin: 0 auto;
}

.header-menu-icon::before,
.header-menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.header-menu-icon::before {
  top: -6px;
}

.header-menu-icon::after {
  top: 6px;
}

.header--menu-open .header-menu-icon {
  background: transparent;
}

.header--menu-open .header-menu-icon::before {
  transform: translateY(6px) rotate(45deg);
}

.header--menu-open .header-menu-icon::after {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 768px) {
  .header {
    flex-wrap: wrap;
    padding: 0.6rem 1rem;
    gap: 0.75rem;
  }
  .header-secondary-inner {
    position: relative;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 0.75rem 1rem;
  }
  .header-secondary-nav {
    flex: 1 1 0;
    min-width: 0;
  }
  .header-secondary-search {
    flex: 0 0 auto;
    width: auto;
    position: static;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    margin-left: 0.5rem;
  }
  .header-search-toggle {
    display: inline-flex;
  }
  .header-search-panel {
    display: none;
    position: absolute;
    top: calc(100% + 0.65rem);
    right: 1rem;
    left: 1rem;
    width: auto;
    margin-top: 0;
    z-index: 30;
    padding: 0.75rem;
    border: 1px solid #27272a;
    border-radius: 12px;
    background: #18181b;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  }
  .header-secondary-search.is-open .header-search-panel {
    display: block;
  }
  .header-secondary-search .search-form {
    width: 100%;
    flex-wrap: wrap;
  }
  .header-search-panel .search-field {
    width: 100%;
    max-width: none;
  }
  .header-secondary-search .search-submit {
    width: 100%;
  }
  .header-logo-img {
    width: 95px;
  }
  .header-menu-btn {
    display: flex;
  }
  .header-nav-main,
  .header-lang-auth {
    display: none;
    width: 100%;
    order: 10;
  }
  .header--menu-open .header-nav-main,
  .header--menu-open .header-lang-auth {
    display: flex;
  }
  .header--menu-open .header-nav-main {
    flex-direction: column;
    gap: 0.25rem;
    padding-top: 0.75rem;
    border-top: 1px solid #27272a;
    margin-top: 0.25rem;
  }
  .header-nav-link {
    padding: 0.6rem 0.75rem;
    display: block;
  }
  .header--menu-open .header-lang-auth {
    flex-direction: column;
    align-items: center;
    margin-left: 0;
    padding-bottom: 0.5rem;
    border-top: 1px solid #27272a;
    padding-top: 0.75rem;
    gap: 0.75rem;
  }
  .header--menu-open .header-auth {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    width: 100%;
  }
  .header--menu-open .header-auth .header-btn-login {
    display: inline-block;
    text-align: center;
    min-width: 10rem;
  }
  .header--menu-open .header-lang {
    width: 100%;
    display: flex;
    justify-content: center;
  }
  .header--menu-open .header-lang-select {
    min-width: 8rem;
  }
}

.page {
  width: 100%;
}

.page-home-nerdy {
  padding-bottom: 2rem;
  background: radial-gradient(ellipse 90% 50% at 50% -10%, rgba(30, 27, 75, 0.22) 0%, transparent 50%);
}

.page-home-editorial {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-bottom: 2rem;
}

.home-topics {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
}

.home-topics-label {
  flex-shrink: 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--tn-text-strong);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.home-topics-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.home-topic-link {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.12);
  color: var(--tn-text);
  font-size: 0.84rem;
  font-weight: 600;
}

.home-topic-link:hover {
  background: rgba(99, 102, 241, 0.22);
  color: var(--tn-text-strong);
}

.home-featured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: start;
}

.home-side-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.home-lead-story,
.home-side-block,
.home-category-list {
  padding: 1.15rem;
}

.home-lead-story {
  overflow: hidden;
  height: 100%;
}

.home-lead-story-media {
  display: block;
  margin: -1.15rem -1.15rem 1rem;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.home-lead-story-image,
.home-compact-item-image,
.home-category-lead-image,
.home-category-item-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-lead-story-body {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  min-height: 100%;
}

.home-lead-story-title {
  margin: 0;
  color: var(--tn-text-strong);
  font-size: clamp(1.2rem, 1.75vw, 1.85rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.home-lead-story-title a,
.home-compact-item-title a,
.home-feed-title a,
.home-category-lead-title a,
.home-category-item-title a {
  color: inherit;
}

.home-lead-story-excerpt,
.home-category-lead-excerpt {
  margin: 0;
  color: var(--tn-text-muted);
  font-size: 0.98rem;
}

.home-section-link {
  margin-left: auto;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--tn-primary-soft);
}

.home-section-link:hover {
  color: var(--tn-primary-soft-2);
}

.home-compact-list,
.home-feed-list {
  display: flex;
  flex-direction: column;
}

.home-compact-item {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  padding: 0.95rem 0;
  border-top: 1px solid var(--tn-border);
  align-items: stretch;
}

.home-category-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 0.9rem;
  padding: 0.95rem 0;
  border-top: 1px solid var(--tn-border);
}

.home-compact-item:first-child,
.home-feed-item:first-child,
.home-category-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.home-compact-item:last-child,
.home-feed-item:last-child,
.home-category-item:last-child {
  padding-bottom: 0;
}

.home-compact-item-body,
.home-category-item-body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
}

.home-compact-item-media {
  display: block;
  width: 100%;
  min-height: 160px;
  border-radius: 10px;
  overflow: hidden;
}

.home-category-item-media {
  display: block;
  width: 112px;
  height: 84px;
  border-radius: 10px;
  overflow: hidden;
}

.home-compact-item-title {
  margin: 0;
  color: var(--tn-text-strong);
  font-size: 0.88rem;
  line-height: 1.2;
}

.home-compact-item-excerpt {
  margin: 0;
  color: var(--tn-text-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.home-feed-title,
.home-category-item-title {
  margin: 0;
  color: var(--tn-text-strong);
  font-size: 1rem;
  line-height: 1.25;
}

.home-feed-item {
  display: block;
  padding: 0.9rem 0;
  border-top: 1px solid var(--tn-border);
}

.home-feed-body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.home-feed-category {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.12);
  color: var(--tn-primary-soft-2);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.2;
}

.home-feed-category:hover {
  color: var(--tn-text-strong);
  background: rgba(99, 102, 241, 0.22);
}

.home-feed-time {
  color: var(--tn-text-soft);
  font-size: 0.78rem;
  font-weight: 500;
}

.home-feed-excerpt {
  margin: 0;
  color: var(--tn-text-muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.home-category-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.home-category-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 1.25rem;
  align-items: start;
}

.home-category-lead {
  overflow: hidden;
}

.home-category-lead-media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.home-category-lead-body {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1.15rem;
}

.home-category-lead-title {
  margin: 0;
  color: var(--tn-text-strong);
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.15;
}

.home-hero-nerdy {
  text-align: center;
  padding: 3rem 1.5rem 2.4rem;
  margin-bottom: 2rem;
  background: linear-gradient(165deg, #1e1b4b 0%, #312e81 35%, #0f0f12 85%);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(30, 27, 75, 0.4);
}

.home-hero-badge {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--tn-primary-soft-2);
  background: rgba(99, 102, 241, 0.22);
}

.home-hero-nerdy h1,
.page-title,
.single-post-title {
  margin: 0 0 0.65rem;
  color: var(--tn-text-strong);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.home-hero-tagline,
.page-description {
  margin: 0 auto;
  color: #a5b4fc;
  font-size: 1rem;
}

.home-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.home-section-title,
.home-block-title {
  margin: 0;
  color: var(--tn-text-strong);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

article.section-card,
article.page-header,
article.single-post,
article.empty-state,
article.home-how-card,
article.post-card,
article.hero-post-card {
  background: var(--tn-surface);
  border: 1px solid var(--tn-border);
  border-radius: var(--tn-radius);
  box-shadow: var(--tn-shadow);
}

.home-featured-story {
  margin-bottom: 2rem;
  padding: 1.35rem;
}

.hero-post-card {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.25rem;
  padding: 1.2rem;
  background: linear-gradient(145deg, rgba(30, 27, 75, 0.45) 0%, #18181b 100%);
}

.hero-post-card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-post-card-title {
  margin: 0.75rem 0;
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  line-height: 1.1;
}

.hero-post-card-title a {
  color: var(--tn-text-strong);
}

.hero-post-card-excerpt {
  margin: 0.85rem 0 0;
  color: var(--tn-text-muted);
  font-size: 1rem;
}

.hero-post-card-media {
  min-height: 280px;
}

.home-lead-story-media,
.home-compact-item-media,
.home-category-lead-media,
.home-category-item-media,
.post-card-media,
.single-post-media {
  position: relative;
  background:
    radial-gradient(circle at top left, rgba(99, 102, 241, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(39, 39, 42, 0.96), rgba(24, 24, 27, 0.98));
}

.tn-image-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.05) 28%,
    rgba(255, 255, 255, 0.13) 46%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0.13) 54%,
    rgba(255, 255, 255, 0.05) 72%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

.tn-image-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)),
    radial-gradient(circle at center, rgba(255, 255, 255, 0.05), transparent 68%);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

.tn-image-shell.is-loading::before {
  opacity: 1;
  animation: tn-image-shimmer 1.55s ease-in-out infinite;
}

.tn-image-shell.is-loading::after {
  opacity: 1;
  animation: tn-image-pulse 1.8s ease-in-out infinite;
}

.hero-post-card-image,
.post-card-image,
.single-post-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
}

.home-lead-story-image,
.home-compact-item-image,
.home-category-lead-image,
.home-category-item-image,
.post-card-image,
.single-post-image {
  opacity: 1;
  filter: none;
  transition: opacity 0.4s ease, transform 0.45s ease, filter 0.45s ease;
}

.tn-image-shell.is-loading img {
  opacity: 0.14;
  filter: blur(10px) saturate(0.9);
  transform: scale(1.04);
}

.tn-image-shell.is-loaded img {
  opacity: 1;
  filter: none;
  transform: none;
}

@keyframes tn-image-shimmer {
  100% {
    transform: translateX(100%);
  }
}

@keyframes tn-image-pulse {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 0.8;
  }
}

.home-how-section {
  margin-bottom: 2rem;
}

.home-how-grid,
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
}

.posts-carousel {
  position: relative;
}

.posts-carousel-viewport {
  overflow: hidden;
  width: 100%;
  padding: 0 0.35rem;
}

.posts-carousel-track {
  display: flex;
  gap: 1.2rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 0.25rem;
  cursor: grab;
  user-select: none;
  touch-action: pan-y;
}

.posts-carousel-track::-webkit-scrollbar {
  display: none;
}

.posts-carousel-track.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  scroll-snap-type: none;
}

.posts-carousel-slide {
  flex: 0 0 calc((100% - 3.6rem) / 4);
  min-width: 0;
  scroll-snap-align: start;
}

.posts-carousel-slide--featured {
  flex-basis: calc((100% - 2.4rem) / 3);
}

.posts-carousel-slide .post-card {
  height: 100%;
}

.posts-carousel-btn {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--tn-border-strong);
  border-radius: 999px;
  background: rgba(24, 24, 27, 0.92);
  color: var(--tn-text-strong);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
  backdrop-filter: blur(8px);
}

.posts-carousel-btn--prev {
  left: -0.75rem;
}

.posts-carousel-btn--next {
  right: -0.75rem;
}

.posts-carousel-btn:hover {
  background: var(--tn-surface-2);
  border-color: var(--tn-primary);
}

.posts-carousel-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.posts-carousel-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.9rem;
}

.posts-carousel-dot {
  width: 0.65rem;
  height: 0.65rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
  transition: width 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

.posts-carousel-dot:hover {
  background: rgba(255, 255, 255, 0.32);
}

.posts-carousel-dot.is-active {
  width: 1.75rem;
  background: var(--tn-primary);
}

.home-how-card {
  padding: 1.5rem;
}

.home-how-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: 0.9rem;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, #4338ca, #6366f1);
}

.home-how-card h3 {
  margin: 0 0 0.45rem;
  color: var(--tn-text-strong);
}

.home-how-card p {
  margin: 0;
  color: var(--tn-text-muted);
}

.post-card {
  display: flex;
  position: relative;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.post-card:hover {
  transform: translateY(-2px);
  border-color: var(--tn-border-strong);
  background: var(--tn-surface-2);
}

.post-card-overlay-link {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.post-card-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.post-card-image {
  border-radius: 0;
}

.post-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1.15rem;
}

.post-card-categories {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.post-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.18);
  color: var(--tn-primary-soft-2);
  font-size: 0.78rem;
  font-weight: 600;
}

.post-card-title {
  margin: 0;
  color: var(--tn-text-strong);
  font-size: 1.2rem;
  line-height: 1.25;
}

.post-card-title a {
  position: relative;
  z-index: 3;
  color: inherit;
  text-decoration: none;
}

.post-card-title a:hover {
  color: var(--tn-primary);
}

.post-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  color: var(--tn-text-soft);
  font-size: 0.83rem;
}

.post-meta-item {
  position: relative;
}

.post-card-excerpt {
  margin: 0;
  color: var(--tn-text-muted);
}

.post-card-read-more {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: auto;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--tn-primary);
  text-decoration: none;
}

.post-card-read-more:hover {
  text-decoration: underline;
}

.home-picks-section,
.related-posts {
  margin-bottom: 2rem;
}

.home-ver-todos {
  display: inline-flex;
  align-items: center;
  margin-top: 1rem;
  font-weight: 600;
}

.page-header,
.empty-state {
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.empty-state {
  text-align: center;
}

.page-header .page-description p,
.page-description p {
  color: var(--tn-text-muted);
}

.page-archive .posts-grid,
.page-search .posts-grid {
  margin-bottom: 1.5rem;
}

.pagination-wrap {
  margin-top: 1.5rem;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.nav-links a,
.nav-links span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.9rem;
  border-radius: 10px;
  background: var(--tn-surface);
  border: 1px solid var(--tn-border);
  color: var(--tn-text-muted);
}

.nav-links .current {
  background: rgba(99, 102, 241, 0.2);
  color: var(--tn-text-strong);
  border-color: rgba(99, 102, 241, 0.4);
}

article.single-post {
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.single-post-header {
  margin-bottom: 1.25rem;
}

.single-post-media {
  margin: 1.25rem 0 1.5rem;
  overflow: hidden;
  border-radius: 16px;
}

.single-post-content {
  color: var(--tn-text);
  font-size: 1.02rem;
}

.single-post-content h2,
.single-post-content h3,
.single-post-content h4 {
  color: var(--tn-text-strong);
  line-height: 1.2;
  margin-top: 1.8rem;
}

.single-post-content p,
.single-post-content ul,
.single-post-content ol,
.single-post-content blockquote {
  margin: 0 0 1.15rem;
}

.single-post-content ul,
.single-post-content ol {
  padding-left: 1.25rem;
}

.single-post-content blockquote {
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--tn-primary);
  background: rgba(99, 102, 241, 0.08);
  color: var(--tn-text-muted);
  border-radius: 0 12px 12px 0;
}

.single-post-content a {
  text-decoration: underline;
}

.search-form-wrap {
  margin-top: 1rem;
}

.search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.search-field,
input[type="text"],
input[type="email"],
input[type="search"],
textarea {
  width: min(100%, 520px);
  padding: 0.9rem 1rem;
  color: var(--tn-text);
  background: var(--tn-surface);
  border: 1px solid var(--tn-border-strong);
  border-radius: 12px;
}

.search-field:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="search"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--tn-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.app-footer {
  margin-top: 2rem;
  padding: 2rem 1.5rem 1.5rem;
  background: var(--tn-surface);
  border-top: 1px solid var(--tn-border);
  text-align: center;
}

.app-footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem 2rem;
  max-width: var(--tn-container);
  margin: 0 auto 2rem;
  text-align: left;
}

.app-footer-col-title {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--tn-text-strong);
}

.app-footer-links,
.app-footer-widget ul,
.menu-footer,
.menu-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.app-footer-links li,
.app-footer-widget li,
.menu-footer li {
  margin-bottom: 0.45rem;
}

.app-footer-links a,
.app-footer-widget a,
.menu-footer a {
  color: var(--tn-text-muted);
  font-size: 0.92rem;
}

.app-footer-links a:hover,
.app-footer-widget a:hover,
.menu-footer a:hover {
  color: var(--tn-text-strong);
}

.app-footer-disclaimer {
  margin: 0 auto 0.5rem;
  font-size: 0.8rem;
  color: #71717a;
  max-width: 560px;
}

.app-footer-responsible {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  color: #71717a;
}

.app-footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1rem;
}

.app-footer-legal a {
  color: #a1a1aa;
  font-size: 0.875rem;
}

.app-footer-legal a:hover {
  color: #fafafa;
}

.menu-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.25rem;
}

.app-footer-email {
  margin: 0 0 0.25rem;
  font-size: 0.9rem;
}

.app-footer-email a {
  color: #a78bfa;
}

.app-footer-email a:hover {
  color: #c4b5fd;
}

.app-footer-copyright {
  margin: 0 0 1rem;
  font-size: 0.8rem;
  color: #52525b;
}

.app-footer-social {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.app-footer-social a {
  color: #71717a;
  padding: 0.25rem;
}

.app-footer-social a:hover {
  color: #a78bfa;
}

.app-footer-lang {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.app-footer-lang-select {
  padding: 0.35rem 0.6rem;
  font-size: 0.9rem;
  color: #a1a1aa;
  background: #27272a;
  border: 1px solid #3f3f46;
  border-radius: 6px;
  cursor: pointer;
}

.app-footer-lang-select:hover,
.app-footer-lang-select:focus {
  color: #e4e4e7;
  border-color: #71717a;
  outline: none;
}

.app-footer-col--two-cols .app-footer-links {
  column-count: 2;
  column-gap: 1rem;
}

.app-footer-col--two-cols .app-footer-links li {
  break-inside: avoid;
}

.wp-block-group,
.wp-block-columns,
.wp-block-cover,
.wp-block-image,
.wp-block-quote {
  margin-bottom: 1.25rem;
}

.wp-block-quote {
  border-left: 4px solid var(--tn-primary);
  padding-left: 1rem;
}

.alignwide,
.alignfull {
  width: 100%;
}

@media (max-width: 920px) {
  .home-side-panels,
  .hero-post-card {
    grid-template-columns: 1fr;
  }

  .home-category-layout {
    grid-template-columns: 1fr;
  }

  .posts-carousel-slide {
    flex-basis: calc((100% - 1.2rem) / 2);
  }

  .posts-carousel-slide--featured {
    flex-basis: calc((100% - 1.2rem) / 2);
  }
}

@media (max-width: 768px) {
  .home-topics {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-lead-story,
  .home-side-block,
  .home-category-list {
    padding: 1rem;
  }

  .home-lead-story-media {
    margin: -1rem -1rem 0.85rem;
  }

  .home-compact-item,
  .home-category-item {
    grid-template-columns: 1fr;
  }

  .home-compact-item-media,
  .home-category-item-media {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    order: -1;
  }

  .home-feed-item {
    grid-template-columns: 1fr;
  }

  .posts-carousel {
    padding: 0 0.1rem;
  }

  .posts-carousel-btn {
    width: 2.4rem;
    height: 2.4rem;
  }

  .posts-carousel-btn--prev {
    left: -0.35rem;
  }

  .posts-carousel-btn--next {
    right: -0.35rem;
  }

  .posts-carousel-slide {
    flex-basis: 100%;
  }

  .posts-carousel-slide--featured {
    flex-basis: 100%;
  }

  .app-footer-col--two-cols {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 100%;
  }

  .main {
    padding: 1rem;
  }

  .home-hero-nerdy,
  .single-post,
  .page-header,
  .home-featured-story {
    padding: 1.1rem;
  }

  .single-post-title,
  .page-title,
  .home-hero-nerdy h1 {
    font-size: 1.8rem;
  }

  .search-form {
    flex-direction: column;
    align-items: stretch;
  }

  .search-field,
  .search-submit {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .app-footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .app-footer-col--two-cols {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 100%;
  }
}
