/*
 * Theme Name: My Timber 2.x Starter Theme
 * Description: Starter Theme to use with Timber
 * Author: Upstatement and YOU!
 */

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-strong: #eef2f7;
  --text: #000000;
  --muted: #374151;
  --border: #0000001a;
  --primary: #000000;
  --primary-strong: #1a1a1a;
  --accent: #645ff6;
  --accent-strong: #514bf0;
  --pill: #ffffff;
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  --radius-lg: 16px;
  --radius-xl: 28px;
  --container: 1200px;
}

* {
  box-sizing: border-box;
}

body.flexus-body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

main#content {
  padding-top: 4.5rem;
  width: 100%;
  display: block;
}

html.dark-mode {
  --bg: #000000;
  --surface: #0b0b0b;
  --surface-strong: #1a1a1a;
  --text: #ffffff;
  --muted: #cbd5e1;
  --border: #ffffff1a;
  --primary: #ffffff;
  --primary-strong: #e5e5e5;
  --accent: #8b86ff;
  --accent-strong: #c9c7ff;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(100% - 48px, var(--container));
  margin: 0 auto;
}

.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-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  width: 100%;
  height: 4.5rem;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
}

body.admin-bar .site-header {
  top: 32px;
}

html.dark-mode .site-header {
  background: #000000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  height: 28px;
  width: auto;
}

.brand-logo--dark {
  display: none;
}

html.dark-mode .brand-logo--light {
  display: none;
}

html.dark-mode .brand-logo--dark {
  display: inline-block;
}

.site-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav-list {
  display: none;
  list-style: none;
  gap: 2.375rem;
  padding: 0 20px;
  height: 2rem;
  margin: 0;
  background: linear-gradient(0deg, rgba(200, 216, 229, 0.05) 0%, rgba(128, 156, 191, 0.05) 100%);
  border-radius: 1.875rem;
  border: 1px solid #ffffff;
  align-items: center;
}

html.dark-mode .nav-list {
  background: rgba(255, 255, 255, 0.04);
  border-color: #a0bbdc10;
}

.nav-link {
  display: inline-flex;
  padding: 0.15rem 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover {
  color: var(--accent-strong);
  background: transparent;
}

html.dark-mode .nav-link:hover {
  background: transparent;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-burger {
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  position: relative;
  z-index: 60;
}

.header-burger__icon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 24px;
  height: 18px;
  position: relative;
}

.header-burger__icon span {
  width: 24px;
  height: 2px;
  background: var(--text);
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.header-burger__icon span:nth-child(1) {
  top: 0;
}

.header-burger__icon span:nth-child(2) {
  top: 8px;
}

.header-burger__icon span:nth-child(3) {
  top: 16px;
}

.mobile-menu-open .header-burger__icon span:nth-child(1) {
  top: 8px;
  transform: rotate(45deg);
}

.mobile-menu-open .header-burger__icon span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-open .header-burger__icon span:nth-child(3) {
  top: 8px;
  transform: rotate(-45deg);
}

.header-mobile {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #ffffff;
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 7rem 1.5rem 2rem;
  gap: 2rem;
  z-index: 55;
}

.header-mobile__nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
  padding-top: 4.25rem;
}

.header-mobile__link {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.header-mobile__link:hover {
  opacity: 0.7;
}

.header-mobile__cta {
  margin-top: auto;
  width: 100%;
  justify-content: center;
}

html.dark-mode .header-mobile {
  background: #1a1a1a;
}

.mobile-menu-open .header-mobile {
  display: flex;
}

.theme-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 70px;
  height: 36px;
  padding: 3px;
  border-radius: 400px;
  background: #ececec;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.theme-switch:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.theme-switch__handle {
  position: absolute;
  left: 3px;
  width: 30px;
  height: 30px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  transition: left 0.3s ease;
}

.theme-switch__icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.theme-switch__icon svg {
  width: 16px;
  height: 16px;
}

.theme-switch__icon--moon {
  opacity: 1;
}

.theme-switch--dark .theme-switch__handle {
  left: calc(100% - 33.5px);
}

.theme-switch--dark .theme-switch__icon--sun {
  opacity: 1;
}

.theme-switch--dark .theme-switch__icon--moon {
  opacity: 0;
}

html.dark-mode .theme-switch {
  background: #4f4f4f;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  background: var(--primary);
  color: #ffffff;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--shadow);
}

.cta-button:hover {
  transform: translateY(-1px);
  background: var(--primary-strong);
}

html.dark-mode .cta-button {
  color: #000000;
}

.hero {
  background: radial-gradient(circle at top, rgba(49, 167, 240, 0.25), transparent 55%),
    linear-gradient(0deg, rgba(100, 95, 246, 0.08), rgba(152, 211, 248, 0.08)),
    linear-gradient(180deg, var(--surface) 0%, #ffffff 100%);
  padding: 96px 0 72px;
  border-bottom: 1px solid var(--border);
  width: 100%;
}

html.dark-mode .hero {
  background: radial-gradient(circle at top, rgba(91, 197, 255, 0.15), transparent 55%),
    linear-gradient(180deg, #000000 0%, #0b0b0b 100%);
}

.hero-inner {
  text-align: center;
  margin: 0 auto;
  max-width: 720px;
}

.hero-eyebrow {
  margin: 0 0 12px;
  font-family: "Azeret Mono", monospace;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: var(--muted);
  font-weight: 700;
}

.hero h1 {
  margin: 0 0 16px;
  font-family: "Manrope", sans-serif;
  font-size: clamp(2.6rem, 3vw + 1.8rem, 4rem);
  line-height: 1.05;
}

.hero-subtitle {
  margin: 0 auto;
  max-width: 640px;
  font-size: 1.1rem;
  color: var(--muted);
}

.page-title {
  text-align: center;
  margin: 40px auto 0;
  font-family: "Manrope", sans-serif;
}

.filter-bar {
  position: sticky;
  top: 4.5rem;
  z-index: 40;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
  width: 100%;
}

body.admin-bar .filter-bar {
  top: calc(4.5rem + 32px);
}

html.dark-mode .filter-bar {
  background: rgba(0, 0, 0, 0.96);
}

.filter-inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px 0;
}

.posts {
  background: #ffffff;
  width: 100%;
}

html.dark-mode .posts {
  background: #000000;
}

.posts .container {
  position: relative;
}

.posts .container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 160px;
  background: linear-gradient(180deg, rgba(246, 247, 249, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

html.dark-mode .posts .container::before {
  background: linear-gradient(180deg, rgba(10, 10, 10, 0.9) 0%, rgba(0, 0, 0, 0) 100%);
}

.post-grid {
  position: relative;
  z-index: 1;
}

.topic-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.topic-pills::-webkit-scrollbar {
  display: none;
}

.pill {
  white-space: nowrap;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--pill);
  color: var(--muted);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 700;
  transition: all 0.2s ease;
}

html.dark-mode .pill {
  background: #111111;
}

.pill:hover {
  color: var(--accent-strong);
  border-color: var(--accent);
}

.pill-active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

html.dark-mode .pill-active {
  color: #ffffff;
}

.search-form {
  width: 100%;
  max-width: 320px;
  align-self: flex-start;
  position: relative;
}

.search-form input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
}

.search-form__icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-form__icon svg {
  width: 16px;
  height: 16px;
}

html.dark-mode .search-form input {
  background: #111111;
  color: #ffffff;
}

html.dark-mode .post-card__body p {
  color: #cbd5e1;
}

html.dark-mode .search-form__icon {
  color: #94a3b8;
}

.posts {
  padding: 48px 0 72px;
}

.post-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

.post-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.post-card__media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-strong);
  aspect-ratio: 16 / 10;
}

.post-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.post-card:hover .post-card__media img {
  transform: scale(1.04);
}

.post-card__media-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e2e8f0, #f8fafc);
}

html.dark-mode .post-card__media-placeholder {
  background: linear-gradient(135deg, #0f172a, #1f2937);
}

.post-card__body h3 {
  margin: 0 0 10px;
  font-family: "Manrope", sans-serif;
  font-size: 1.1rem;
  line-height: 1.4;
}

.post-card__body h3 a:hover {
  color: var(--accent-strong);
}

.post-card__body p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.85rem;
}

.post-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.post-tag {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  font-weight: 800;
  text-transform: uppercase;
  background: var(--surface);
  border: 1px solid var(--border);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
}

.meta-dot {
  color: #9ca3af;
}

.pagination {
  margin-top: 40px;
  display: flex;
  justify-content: center;
}

.pagination-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  margin: 0;
}

.page-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  transition: all 0.2s ease;
  background: #ffffff;
}

html.dark-mode .page-btn {
  background: #111111;
  color: #ffffff;
}

.page-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.page-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

html.dark-mode .page-btn.active {
  color: #000000;
}

.page-btn.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: #f6f7f9;
}

html.dark-mode .site-footer {
  background: #000000;
}

.footer {
  background: #f6f7f9;
}

html.dark-mode .footer {
  background: #000000;
}

.footer__container {
  padding: 3.25rem 0;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 3rem;
}

.footer__group {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2.5rem;
}

.footer__bottom {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
}

.footer__social {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.footer__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 0.1875rem;
  background: #000000;
}

html.dark-mode .footer__social-link {
  background: #ffffff;
}

.footer__social-link svg {
  width: 0.75rem;
  height: 0.75rem;
  fill: #ffffff;
}

html.dark-mode .footer__social-link svg {
  fill: #000000;
}

.footer__copy {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}

.footer__grid {
  display: flex;
  align-items: flex-start;
  gap: 3.125rem;
}

.footer__column {
  display: flex;
  flex-direction: column;
}

.footer__column-header {
  margin-bottom: 1.5rem;
  color: #969696;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.25;
}

html.dark-mode .footer__column-header {
  color: #d8d8d8;
}

.footer__link {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25;
  transition: color 0.15s ease-in-out;
}

.footer__link + .footer__link {
  margin-top: 0.75rem;
}

.footer__link:hover {
  color: var(--accent);
}


.empty-state {
  text-align: center;
  color: var(--muted);
  font-weight: 600;
}

@media (min-width: 900px) {
  .nav-list {
    display: flex;
  }

  .filter-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .search-form {
    align-self: center;
  }
}

@media (max-width: 900px) {
  .site-header {
    height: 4rem;
  }

  main#content {
    padding-top: 4rem;
  }

  .header-inner {
    padding: 0.75rem 0;
  }

  .header-actions {
    gap: 0.5rem;
  }

  .cta-button {
    display: none;
  }

  .header-burger {
    display: flex;
  }
}

@media (max-width: 768px) {
  .footer__container {
    flex-direction: column-reverse;
  }

  .footer__grid {
    justify-content: space-between;
    flex-wrap: wrap;
  }
}

@media (max-width: 420px) {
  .footer__grid {
    justify-content: flex-start;
    gap: 4.6rem;
    row-gap: 2.5rem;
    flex-wrap: wrap;
  }

  .brand-logo {
    max-width: 7rem;
    height: auto;
  }
}

@media (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }

  body.admin-bar .filter-bar {
    top: calc(4rem + 46px);
  }
}

@media (min-width: 768px) {
  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .post-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .header-inner {
    flex-wrap: wrap;
  }

  .site-nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}
