/* ===== Tokens / Base ===== */
:root {
  --bg: #ffffff;
  --fg: #111827;
  --muted: #6b7280;
  --accent: #5b21b6;
  --border: rgba(0, 0, 0, 0.12);

  --container: 1140px;
  --radius: 8px;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
}
body {
  background: var(--bg);
  color: var(--fg);
}
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}
a {
  color: inherit;
}

/* ===== Header ===== */
.site-header {
  position: relative;
  background: #fff;
  z-index: 20;
}
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--border);
  transform: scaleY(0.5);
  transform-origin: bottom;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 72px;
}

/* === Order & alignment (Left: burger+logo, Middle: nav, Right: actions) === */
.hamburger {
  order: 0;
}
.logo-link {
  order: 1;
}
.nav-desktop {
  order: 2;
  display: flex;
  gap: 28px;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
}
.header-actions {
  order: 3;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Logo (small size) */
.logo-link {
  display: inline-flex;
  align-items: center;
}
.logo-img {
  height: 20px;
  width: auto;
  display: block;
}

/* Desktop nav */
.nav-desktop a {
  text-decoration: none;
  font-weight: 500;
  color: var(--fg);
}
.nav-desktop a.active,
.nav-desktop a:hover,
.nav-desktop a:focus-visible {
  color: black;
  font-weight: bold;
  outline: none;
}

/* Right side actions */
.icon-btn {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--fg);
  cursor: pointer;
}
.icon-btn:hover {
  background: #f6f7f9;
}
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-block;
  background: #d9dbe1;
  border: 1px solid rgba(0, 0, 0, 0.1);
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Login pill */
.login-link {
  text-decoration: none;
  color: #111827;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 10px;
  background: #f1f1f5;
}
.login-link:hover {
  background: #e9e9f2;
}

/* Hamburger (hidden on desktop) */
.hamburger {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  background: #fff;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.hamburger .bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--fg);
  margin: 3px 0;
  border-radius: 2px;
}

/* ===== Mobile drawer ===== */
.mobile-drawer {
  position: fixed;
  inset: 0 auto 0 0;
  width: 280px;
  max-width: 82%;
  background: #fff;
  border-right: 1px solid var(--border);
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  z-index: 40;
  padding: 16px;
}
.mobile-drawer.is-open {
  transform: translateX(0);
}
.drawer-nav {
  display: grid;
  gap: 14px;
  margin-top: 8px;
}
.drawer-nav a {
  text-decoration: none;
  color: var(--fg);
  font-weight: 600;
}
.drawer-nav a.active {
  color: var(--accent);
}
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 30;
}
.drawer-backdrop[hidden] {
  display: none;
}
.drawer-backdrop.is-open {
  display: block;
}

/* ===== Auth visibility ===== */
.auth-user {
  display: none;
}
.auth-guest {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
body.is-auth .auth-user {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
body.is-auth .auth-guest {
  display: none;
}

/* ===== Slider placeholder ===== */
.hero-slider {
  padding: 24px 0 12px;
}
.slider-ph {
  width: 100%;
  max-width: 1140px;
  aspect-ratio: 1140/311;
  min-height: 311px;
  background: #eef0f3;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius);
  margin: 0 auto;
}

/* ===== Explore Section (after slider) ===== */

.filter-bar {
  padding: 8px 0;
}
.filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.pill {
  appearance: none;
  border: 1px solid var(--border);
  background: #f5f6f8;
  color: var(--fg);
  padding: 8px 14px;
  height: 38px;
  border-radius: 11px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 0.01em;
}
.pill:hover {
  background: #eef0f3;
}
.pill.is-active {
  background: #111;
  color: #fff;
  border-color: #111;
}

/* Title */
.explore-title {
  margin: 18px 0 12px;
  font-size: 22px;
  line-height: 1.2;
}

.explore-section {
  padding-top: 8px;
}
.explore-title {
  margin-top: 16px;
}

/* Cards container */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: start;
  margin-bottom: 150px;
}

/* Card */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-img {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.card-body {
  padding: 12px;
}
.card-author {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 6px;
}
.avatar-sm {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.card-title {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.25;
}
.card-excerpt {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.meta-dot {
  opacity: 0.6;
}

/* Empty state */
.empty {
  color: var(--muted);
  text-align: center;
  margin-bottom: 150px;
}
.is-hidden {
  display: none !important;
}

/*edit fab button*/
.edit-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  background: #111;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
}
/* ===== Footer (pixel-tuned to mock) ===== */
.footer {
  background: #111;
  width: 100%;
  padding: 0;
}

/* container alignment */
.footer .wrapper {
  max-width: var(--container);
  margin: 0 auto;
  color: #fff;
}

.footer-nav {
  display: flex;
  justify-content: space-around;
  gap: 80px;
}
.footer-nav-logo {
  display: flex;
  justify-content: space-between;
  padding-top: 80px;
  width: 100%;
}

/* left block */
.footer-logo-p {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
/* large wordmark */
.footer-div-p {
  max-width: 700px;
  font-size: 16px;
  line-height: 28px;
  color: #fff;
  opacity: 0.92;
}

.h4-nav-footer {
  margin: 0 0 40px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}
.footer-ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.footer-ul li,
.footer-ul li a {
  color: #f1f1f1;
  font-size: 14px;
  line-height: 20px;
  text-decoration: none;
  opacity: 0.9;
}
.footer-ul li a:hover,
.footer-ul li a:focus-visible {
  opacity: 1;
  text-decoration: underline;
  outline: none;
}

/* bottom row: © left, socials right; balanced spacing */
.div-under {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 64px;
  padding-top: 20px;
  padding-bottom: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}
.p-footer-down {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 16px;
}

/* social icons aligned to right edge with equal spacing */
.div-social {
  display: flex;
  align-items: center;
  gap: 28px;
  color: white;
}
.div-social img {
  width: 24px;
  height: 24px;
  display: block;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .header-inner {
    height: 108px;
  }
  .nav-desktop {
    display: none;
    flex: 0 0 auto;
  }
  .hamburger {
    display: inline-flex;
  }
  .header-actions {
    gap: 10px;
  }
  .icon-btn {
    width: 38px;
    height: 38px;
  }

  /* Small logo for mobile */
  .logo-img {
    height: 16px;
  }

  /* Mobile slider spec */
  .slider-ph {
    aspect-ratio: 375/243;
    min-height: 243px;
  }
  .cards-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-drawer {
    transition: none;
  }
}
