@import url('https://fonts.googleapis.com/css2?family=Urbanist:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400&family=Bebas+Neue&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ─── TOKENS ─── */
:root {
  --bg:         #141414;
  --surface:    #1e1e1e;
  --surface-h:  #2a2a2a;
  --border:     #383838;
  --accent:     #11a7f7;
  --accent-dim: rgba(17,167,247,0.13);
  --text:       #e5e5e5;
  --muted:      #888888;
  --hero-bg:    #0a0a0a;
  --nav-bg:     #080808;
  --shadow-sm:  none;
  --shadow-md:  none;
  --mono:       'JetBrains Mono','Fira Mono',monospace;
}


/* ─── RESET ─── */
* { margin: 0; padding: 0; box-sizing: border-box; }

@keyframes pageIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Urbanist', 'Segoe UI', sans-serif;
  font-size: 15px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  animation: pageIn 0.3s ease both;
}

body.page-home {
  --bg:        #ffffff;
  --surface:   #f5f5f5;
  --surface-h: #efefef;
  --border:    #e5e5e5;
  --text:      #1a1a1a;
  --muted:     #777;
  --hero-bg:   #ffffff;
  --nav-bg:    #ffffff;
  background: #ffffff;
  color: #333;
}
body.page-home header {
  background: #ffffff;
  border-bottom: 1px solid #e5e5e5;
}
body.page-home .header-nav-bar {
  background: #ffffff;
  border-top: 1px solid #e5e5e5;
}
body.page-home .header-nav-bar nav a {
  color: #888;
}
body.page-home .header-nav-bar nav a:hover {
  color: #222;
}
body.page-home .header-nav-bar nav a.active {
  color: rgba(0,0,0,0.65);
}
body.page-home .header-nav-bar nav a::after {
  background: rgba(0,0,0,0.2);
}
body.page-home .auth-btn:hover { color: #222; }
body.page-home .quicknav-btn:hover { color: #222; border-color: rgba(0,0,0,0.2); }
body.page-home footer {
  background: #f5f5f5;
  border-top: 1px solid #e5e5e5;
}
body.page-home .header-top {
  background: #f5f5f5;
  border-bottom: 1px solid #e5e5e5;
}
body.page-home .footer-copy { color: #999; }
body.page-home .footer-sep { color: #aaa; }
body.page-home .footer-page-name { color: #888; }
body.page-home footer nav a { color: #888; }
body.page-home footer nav a:hover { color: #333; }
body.page-home .header-nav-bar nav a.return-home-btn {
  background: #ffffff;
  color: #111 !important;
  border: 3px solid #111;
  top: 0;
  bottom: -54px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  justify-content: center;
  padding: 0 68px;
}
body.page-home .header-nav-bar nav a.return-home-btn img {
  height: 84px;
  width: auto;
  display: block;
  pointer-events: none;
}
body.page-home .header-nav-bar nav a.return-home-btn:hover {
  background: #ffffff;
  color: #111 !important;
  transform: translateX(-50%) translateY(-3px) scale(1.04);
}
body.page-home .header-nav-bar nav a.return-home-btn:active {
  transform: translateX(-50%) translateY(1px) scale(0.97);
  background: rgba(255,255,255,0.85);
}
/* appstore cream overrides */
body.page-home .hero { background: var(--hero-bg); }
body.page-home .grid-plane {
  background-image: radial-gradient(circle, rgba(0,0,0,0.06) 1px, transparent 1px);
  background-size: 32px 32px;
}
body.page-home .hero-tagline {
  color: var(--text);
  -webkit-text-stroke: 2px #111;
  paint-order: stroke fill;
}
body.page-home .hero-accent {
  -webkit-text-stroke: 2px #111;
  paint-order: stroke fill;
}
body.page-home .col-label { color: #444; }
body.page-home .col-label::after { background: var(--border); }
body.page-home .cat-card {
  background: #ffffff;
  border: 1px solid #e5e5e5;
}
body.page-home .cat-card:hover {
  background: #ebebeb;
  border-color: #d5d5d5;
}
body.page-home .cat-icon { color: rgba(0,0,0,0.45); }
body.page-home .cat-name { color: #1a1a1a; }
body.page-home .cat-desc { color: #777; }
body.page-home .cat-arrow { color: rgba(0,0,0,0.22); }
body.page-home .cat-card:hover .cat-arrow { color: rgba(0,0,0,0.65); }
/* projects page */
body.page-home .tc-card:hover { border-color: rgba(0,0,0,0.15); }
body.page-home .tag-filter-btn:hover { border-color: rgba(0,0,0,0.2); color: #333; background: rgba(0,0,0,0.04); }
/* project detail page */
body.page-home .back-btn:hover { color: #333; }
body.page-home .link-btn:hover { border-color: rgba(0,0,0,0.2); color: #333; }
body.page-home .tag { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.12); color: #555; }
/* auth popup */
body.page-home .auth-popup { background: #ffffff; border-color: rgba(0,0,0,0.12); }
body.page-home .auth-popup-signout { border-color: rgba(0,0,0,0.12); color: #777; }
body.page-home .auth-popup-signout:hover { color: #111; border-color: rgba(0,0,0,0.3); }

/* ─── APPSTORE TEXTURE BACKGROUND ─── */
body.page-appstore {
  background: #c9b89a;
}
body.page-appstore::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url('assets/appstore_decals/cardboard.png');
  background-repeat: repeat;
  background-size: 1920px auto;
  background-color: #c9b89a;
  filter: brightness(1.07);
}
body.page-appstore .col-label {
  color: #ffffff;
  font-size: 16px;
  font-weight: 900;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Urbanist', 'Segoe UI', sans-serif;
  letter-spacing: 0;
  text-transform: none;
  justify-content: center;
  -webkit-text-stroke: 0;
}
body.page-appstore .col-label::before { content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.6); height: 4px; }
body.page-appstore .col-label::after { display: block; background: rgba(255,255,255,0.6); height: 4px; }

/* ─── HEADER ─── */
header {
  background: var(--bg);
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid var(--border);
}

header::before { display: none; }

.header-top {
  padding: 10px 0 12px;
  overflow: hidden;
  max-height: 200px;
  opacity: 1;
  transition: max-height 2s ease, opacity 1.5s ease;
}
.header-top.slide-hidden {
  max-height: 0 !important;
  opacity: 0 !important;
  padding: 0 !important;
}
.header-top-inner {
  max-width: 1196px; margin: 0 auto; padding: 0 38px;
  display: flex; flex-direction: column; gap: 10px;
}
.header-top-row1 { display: flex; align-items: center; position: relative; }

/* logo: in nav bar, greyed until hover */
.logo-box {
  height: 24px; width: auto;
  flex-shrink: 0; margin-right: 18px;
  display: flex; align-items: center; text-decoration: none;
  transition: transform 0.18s;
}
.logo-box:hover { transform: scale(1.07); }
.logo-box img {
  height: 100%; width: auto; object-fit: contain;
  filter: grayscale(1) brightness(0.55);
  opacity: 0.7;
  transition: filter 0.2s, opacity 0.2s;
}
.logo-box:hover img { filter: none; opacity: 1; }

.header-search-row { width: 100%; display: flex; align-items: center; gap: 10px; }
.search-pill-wrap { flex: 2; min-width: 0; position: relative; }

.search-pill {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 16px; width: 100%;
  transition: border-color 0.15s;
}
.search-pill svg { flex-shrink: 0; color: var(--muted); }
.search-pill input {
  background: none; border: none; outline: none;
  color: var(--text); font-family: inherit; font-size: 14px; width: 100%;
}
.search-pill input::placeholder { color: var(--muted); }
.search-pill:focus-within { border-color: var(--accent); }

.quicknav-wrap { flex: 1; min-width: 0; position: relative; }
.quicknav-btn {
  width: 100%; display: flex; align-items: center; gap: 7px;
  padding: 8px 14px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; color: var(--muted); cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 500;
  transition: border-color 0.15s, color 0.15s; white-space: nowrap;
}
.quicknav-btn:hover { border-color: rgba(255,255,255,0.25); color: #ffffff; }
.quicknav-chevron { margin-left: auto; transition: transform 0.2s; flex-shrink: 0; }
.quicknav-btn[aria-expanded="true"] .quicknav-chevron { transform: rotate(180deg); }
.quicknav-dropdown {
  display: none; position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  overflow-y: auto; max-height: calc(3.5 * 74px);
  z-index: 200;
}
.quicknav-dropdown.open { display: block; }
.quicknav-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; min-height: 74px;
  text-decoration: none; color: var(--text); border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.quicknav-item:last-child { border-bottom: none; }
.quicknav-item:hover { background: var(--surface-h); }
.quicknav-thumb { width: 48px; height: 48px; border-radius: 6px; background: var(--bg); object-fit: cover; flex-shrink: 0; }
.quicknav-thumb-placeholder { width: 48px; height: 48px; border-radius: 6px; background: var(--bg); flex-shrink: 0; }
.quicknav-info { flex: 1; min-width: 0; }
.quicknav-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quicknav-desc { font-size: 11px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.quicknav-empty { padding: 16px; font-size: 13px; color: var(--muted); text-align: center; }

.header-right { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.nav-auth { display: flex; align-items: center; gap: 8px; }
.auth-btn {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  color: #555; background: none; border: none;
  padding: 0 20px; height: 38px;
  display: flex; align-items: center;
  cursor: pointer; letter-spacing: 0.05em; text-transform: lowercase;
  white-space: nowrap; transition: color 0.15s;
}
.auth-btn:hover { color: #ffffff; }
#auth-user { display: inline-flex; align-items: center; gap: 8px; position: relative; }
.auth-avatar { width: 28px; height: 28px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.15); object-fit: cover; flex-shrink: 0; cursor: pointer; transition: border-color 0.15s; }
.auth-avatar:hover { border-color: rgba(255,255,255,0.4); }
.auth-avatar-initial {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; cursor: pointer; flex-shrink: 0; user-select: none;
}
.auth-popup {
  position: absolute; top: calc(100% + 10px); right: 0;
  background: #1c1c1e; border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px; padding: 14px 16px;
  min-width: 190px; z-index: 300;
}

.auth-popup-name {
  font-size: 13px; font-weight: 500; color: var(--text);
  margin-bottom: 12px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  letter-spacing: -0.01em;
}
.auth-popup-signout {
  font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.04em;
  color: var(--muted); background: none;
  border: 1px solid rgba(255,255,255,0.1); border-radius: 7px;
  padding: 7px 12px; cursor: pointer; width: 100%;
  text-align: left; transition: color 0.15s, border-color 0.15s;
}
.auth-popup-signout:hover { color: #fff; border-color: rgba(255,255,255,0.3); }

/* theme toggle hidden — dark only */
.theme-toggle-btn { display: none; }

/* ── nav bar ── */
.header-nav-bar { background: var(--nav-bg); border-top: 1px solid #111; position: relative; overflow: visible; }
.header-nav-inner { max-width: 1196px; margin: 0 auto; padding: 0 38px; display: flex; align-items: center; }
.header-nav-bar nav { display: flex; flex: 1; min-height: 38px; }
.header-nav-bar nav a {
  display: flex; align-items: center; padding: 0 20px; height: 38px;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  color: #555; text-decoration: none; letter-spacing: 0.05em; text-transform: lowercase;
  position: relative; transition: color 0.15s;
}
.header-nav-bar nav a::after {
  content: ''; position: absolute; bottom: 0; left: 20px; right: 20px;
  height: 1px; background: rgba(255,255,255,0.25);
  transform: scaleX(0); transform-origin: left; transition: transform 0.2s ease;
}
.header-nav-bar nav a:hover { color: #ffffff; }
.header-nav-bar nav a:hover::after { transform: scaleX(1); }
.header-nav-bar nav a.active { color: rgba(255,255,255,0.65); }
.header-nav-bar nav a.active::after { transform: scaleX(1); }
.header-nav-bar nav a.return-home-btn {
  background: rgba(255,255,255,0.92);
  color: #111 !important;
  font-weight: 700;
  font-size: 21px;
  border-radius: 12px;
  border: 3px solid #fff;
  padding: 0 39px;
  letter-spacing: 0.02em;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: -8px;
  bottom: -8px;
  height: auto;
  z-index: 10;
  white-space: nowrap;
}
.header-nav-bar nav a.return-home-btn {
  transition: background 0.15s, transform 0.15s, border-color 0.15s;
}
.header-nav-bar nav a.return-home-btn:hover {
  background: #ffffff;
  color: #111 !important;
  transform: translateX(-50%) translateY(-3px) scale(1.04);
}
.header-nav-bar nav a.return-home-btn:active {
  transform: translateX(-50%) translateY(1px) scale(0.97);
  background: rgba(255,255,255,0.85);
}
.header-nav-bar nav a.return-home-btn::after { display: none !important; }
.header-nav-bar nav a#admin-link { display: none; }

/* ─── HERO ─── */
.hero {
  background: var(--hero-bg);
  position: relative;
  padding: 72px 0 60px;
  overflow: hidden;
}

.grid-stage { position: absolute; inset: 0; pointer-events: none; }
.grid-plane {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 32px 32px;
}
.hero-vignette { display: none; }

.hero-inner {
  position: relative; z-index: 1;
  max-width: 1196px; margin: 0 auto; padding: 0 38px;
}
.hero-tagline {
  font-size: 62px; font-weight: 700;
  color: var(--text); line-height: 1.15; letter-spacing: -0.02em;
  max-width: 900px;
}
.hero-accent {
  font-size: 93px; font-weight: 800;
  letter-spacing: -0.04em; line-height: 0.9;
  background-image: url('assets/hero/hero.png');
  background-size: 6.2em auto;
  background-position: 0 0;
  background-repeat: round;
  background-attachment: fixed;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ─── MAIN ─── */
main {
  flex: 1; max-width: 1196px; margin: 0 auto; width: 100%;
  padding: 44px 38px 88px;
}

/* ─── SECTION LABEL ─── */
.col-label {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.10em; color: #fff; text-transform: uppercase;
  margin-bottom: 20px; display: flex; align-items: center; gap: 12px;
}
.col-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ─── TRENDING CHARTS (Apple top-apps style) ─── */
.trending-wrap { margin-bottom: 56px; }

.tc-row {
  display: flex; gap: 12px;
  overflow-x: auto; overflow-y: visible;
  scrollbar-width: none; -ms-overflow-style: none;
  padding: 6px 2px 10px;
}
.tc-row::-webkit-scrollbar { display: none; }

.tc-card {
  display: flex; flex-direction: column; align-items: center;
  flex-shrink: 0; position: relative;
  width: 168px; height: 258px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 12px 14px 16px;
  text-decoration: none; color: inherit;
  transition: border-color 0.18s, transform 0.22s cubic-bezier(0.34,1.2,0.64,1);
}
.tc-card:hover {
  border-color: rgba(255,255,255,0.22);
  transform: translateY(-5px);
}

.tc-card-num {
  position: absolute; top: 12px; left: 14px;
  font-family: var(--mono); font-size: 13px; font-weight: 500;
  color: var(--muted); line-height: 1; letter-spacing: -0.01em;
}
.tc-card-icon {
  width: 92px; height: 92px; border-radius: 20px;
  overflow: hidden; flex-shrink: 0;
  background: var(--surface-h);
  margin-top: 26px;
}
.tc-card-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tc-card-name {
  font-size: 13px; font-weight: 600; color: var(--text);
  text-align: center; line-height: 1.3; margin-top: 12px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  width: 100%;
}
.tc-card-cat {
  font-size: 11px; color: var(--muted);
  text-align: center; font-family: var(--mono);
  letter-spacing: 0.02em; margin-top: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%;
}
.tc-card-dl {
  font-family: var(--mono); font-size: 10px; color: var(--muted);
  text-align: center; margin-top: 3px; white-space: nowrap;
}
.tc-card-btn {
  margin-top: auto; padding-top: 12px;
  display: block; width: 100%; text-align: center;
  font-size: 13px; font-weight: 700; color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(17,167,247,0.22);
  border-radius: 999px; padding: 7px 0;
  transition: background 0.15s, border-color 0.15s;
}
.tc-card:hover .tc-card-btn { background: rgba(17,167,247,0.18); border-color: rgba(17,167,247,0.4); }

/* ─── CATEGORIES ─── */
.categories-wrap { margin-bottom: 48px; }

.categories-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

/* Apple-style black cards */
.cat-card {
  background: #0d0d0d;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px; padding: 28px 22px 26px;
  text-decoration: none; display: flex; flex-direction: column;
  position: relative; overflow: hidden; min-height: 164px;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.cat-card:hover {
  background: #1c1c1e;
  border-color: rgba(255,255,255,0.15);
  transform: scale(1.015);
}

.cat-icon {
  margin-bottom: 14px; line-height: 1; color: rgba(255,255,255,0.72);
}
.cat-name {
  font-size: 18px; font-weight: 800; color: #ffffff;
  margin-bottom: 8px; letter-spacing: -0.02em; line-height: 1.2;
}
.cat-desc {
  font-size: 13px; color: rgba(255,255,255,0.48);
  line-height: 1.55; flex: 1;
}
.cat-arrow {
  margin-top: 16px; font-size: 16px; color: rgba(255,255,255,0.3);
  transition: color 0.2s, transform 0.2s; align-self: flex-end;
}
.cat-card:hover .cat-arrow { color: rgba(255,255,255,0.8); transform: translateX(4px); }

/* ─── PROJECT CARDS ─── */
.project-list { display: flex; flex-direction: column; gap: 8px; }

/* tile grid used on projects.html */
.project-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 14px;
}
.project-tile-grid .tc-card { width: 100%; }

.project-row {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  display: flex; align-items: stretch; cursor: pointer; text-decoration: none;
  height: 96px; overflow: hidden;
  transition: background 0.15s, border-color 0.15s, transform 0.18s;
  position: relative;
}
.project-row::after {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--accent); transform: scaleY(0); transform-origin: bottom;
  transition: transform 0.2s ease;
}
.project-row:hover { background: var(--surface-h); border-color: #555; transform: translateX(4px); }
.project-row:hover::after { transform: scaleY(1); }

.card-logos { position: absolute; bottom: 10px; right: 12px; display: none; gap: 6px; align-items: center; }
.show-card-logos .card-logos { display: flex; }
.card-logos img { height: 16px; width: auto; object-fit: contain; opacity: 0.45; }

.project-thumb {
  width: 96px; height: 96px; flex-shrink: 0;
  background: var(--bg); border-right: 1px solid var(--border); overflow: hidden; position: relative;
}
.project-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s ease; }
.project-row:hover .project-thumb img { transform: scale(1.08); }

.project-info { padding: 18px 20px; flex: 1; }
.project-info h3 { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 5px; line-height: 1.3; }
.project-info p { font-size: 13px; color: var(--muted); margin-bottom: 8px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ─── TAGS ─── */
.tag {
  font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: 0.04em;
  color: #777; background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 4px; padding: 2px 6px; margin-right: 4px;
}

/* ─── MORE BUTTON ─── */
.more-wrap { margin-top: 22px; text-align: center; }
.more-btn {
  display: inline-block; font-size: 14px; font-weight: 700;
  color: var(--bg); background: var(--accent);
  border: none; border-radius: 999px;
  padding: 12px 40px; cursor: pointer; text-decoration: none;
  transition: background 0.15s, transform 0.15s;
}
.more-btn:hover { background: #0d8fd4; transform: translateY(-2px); }

/* ─── TAG FILTER (projects.html) ─── */
.tag-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.tag-filter-btn {
  font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.04em;
  color: var(--muted); background: var(--surface);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 6px 14px; cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.tag-filter-btn:hover { border-color: rgba(255,255,255,0.25); color: #ffffff; background: rgba(255,255,255,0.06); }
.tag-filter-btn.active { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.tag-filter-btn.logo-tag { padding: 6px 14px; }

/* ─── PROJECT DETAIL ─── */
.detail-wrap { max-width: none; }
.back-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--muted); text-decoration: none; margin-bottom: 32px;
  transition: color 0.1s;
}
.back-btn:hover { color: #ffffff; }
.back-btn svg { transition: transform 0.15s; }
.back-btn:hover svg { transform: translateX(-3px); }
.detail-preview { width: 100%; border-radius: 10px; border: 1px solid var(--border); margin-bottom: 28px; display: block; object-fit: cover; }
.detail-title { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; color: var(--text); margin-bottom: 16px; line-height: 1.1; }
.detail-body { font-size: 15px; color: var(--muted); line-height: 1.75; margin-bottom: 28px; }
.detail-body p { margin-bottom: 14px; }
.detail-body strong { color: var(--text); font-weight: 600; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.download-btn {
  display: inline-block; font-size: 14px; font-weight: 700;
  color: var(--bg); background: var(--accent);
  border: none; border-radius: 999px; padding: 11px 28px; cursor: pointer; text-decoration: none;
  transition: opacity 0.15s, transform 0.15s;
}
.download-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.link-btn {
  display: inline-block; font-size: 14px; font-weight: 600;
  color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 11px 28px; text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
.link-btn:hover { border-color: rgba(255,255,255,0.3); color: #ffffff; }
.detail-tags-box { border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; margin-bottom: 28px; }
.detail-tags-label { font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; display: block; margin-bottom: 10px; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-images { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 28px; }
.detail-images img { width: calc(50% - 7px); border-radius: 8px; border: 1px solid var(--border); object-fit: cover; }
.detail-videos { display: flex; flex-direction: column; gap: 20px; margin-bottom: 28px; }
.detail-videos iframe { width: 100%; aspect-ratio: 16/9; border-radius: 10px; border: 1px solid var(--border); }

/* ─── APP STORE PAGE ─── */
.app-hero {
  display: flex; align-items: flex-start; gap: 24px;
  margin-bottom: 32px; padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.app-icon {
  width: 112px; height: 112px; border-radius: 26px;
  overflow: hidden; flex-shrink: 0;
  background: var(--surface); border: 1px solid var(--border);
}
.app-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.app-hero-info { display: flex; flex-direction: column; justify-content: center; gap: 7px; padding-top: 4px; flex: 1; min-width: 0; }
.app-hero-name { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; color: var(--text); line-height: 1.15; }
.app-hero-dev { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.app-hero-stats { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.app-dl-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 4px 11px; white-space: nowrap;
}
.app-dl-badge svg { flex-shrink: 0; }
.app-divider { border: none; border-top: 1px solid var(--border); margin: 0 0 32px; }
.app-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.app-section-label {
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.1em;
  color: var(--muted); text-transform: uppercase; display: block; margin-bottom: 14px;
}
.app-screenshots { margin-bottom: 36px; }
.app-shots-wrap {
  position: relative; border-radius: 14px; overflow: hidden;
  background: #000; border: 1px solid var(--border);
  aspect-ratio: 16 / 9;
}
/* absolute so height is guaranteed by the 16/9 wrap, not by content */
.app-shots-row {
  position: absolute; inset: 0;
  display: flex; overflow-x: auto;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; scroll-behavior: smooth;
}
.app-shots-row::-webkit-scrollbar { display: none; }
.app-shots-row img,
.app-shots-row video,
.app-shots-row iframe {
  scroll-snap-align: start; flex: 0 0 100%;
  width: 100%; height: 100%; object-fit: contain;
  display: block; border: none;
}
.app-shots-dots { display: flex; justify-content: center; gap: 7px; margin-top: 12px; }
.app-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--border); cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.app-dot.active { background: var(--accent); transform: scale(1.35); }
.app-shots-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.14); border-radius: 50%;
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 24px; cursor: pointer; z-index: 10; line-height: 1;
  opacity: 0; transition: opacity 0.18s; user-select: none;
}
.app-shots-nav.prev { left: 10px; }
.app-shots-nav.next { right: 10px; }
.app-shots-wrap:hover .app-shots-nav { opacity: 1; }
.app-about { margin-bottom: 36px; }
.app-about-body { font-size: 15px; color: var(--muted); line-height: 1.8; }
.app-about-body + .app-about-body { margin-top: 12px; }
.app-about-body strong { color: var(--text); font-weight: 600; }
.app-tags-section { margin-bottom: 36px; }
.app-share-wrap { display: flex; flex-direction: column; align-items: center; margin: 8px 0 16px; gap: 12px; }
.app-share-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: 0.03em;
  color: var(--muted); background: transparent; border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 20px; cursor: pointer; transition: color 0.15s, border-color 0.15s;
}
.app-share-btn:hover { color: var(--accent); border-color: var(--accent); }
.app-share-btn:disabled { opacity: 0.5; cursor: default; }
.app-share-popup {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 14px; width: 100%; max-width: 400px; box-sizing: border-box;
}
.app-share-popup input {
  flex: 1; background: none; border: none; outline: none;
  font-family: var(--mono); font-size: 12px; color: var(--text); min-width: 0;
}
.app-share-copy {
  font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--accent);
  background: var(--accent-dim); border: 1px solid var(--accent); border-radius: 6px;
  padding: 4px 12px; cursor: pointer; white-space: nowrap; flex-shrink: 0; transition: opacity 0.15s;
}
.app-share-copy:hover { opacity: 0.75; }
@media (max-width: 520px) {
  .app-hero { flex-direction: column; align-items: center; text-align: center; gap: 16px; }
  .app-hero-stats { justify-content: center; }
  .app-actions { justify-content: center; }
  .app-shots-row img { height: 200px; }
}

/* ─── SEARCH ─── */
.search-results {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 99999;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  min-width: 320px; max-height: 360px; overflow-y: auto;
}
.search-result-item { display: block; padding: 12px 18px; text-decoration: none; color: var(--text); border-bottom: 1px solid var(--border); font-size: 14px; font-weight: 500; transition: background 0.1s; }
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--surface-h); }
.search-result-item span { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-left: 8px; }
.search-pill-wrap { position: relative; }

/* ─── WEBLOGOS ─── */
.weblogos-bar { max-width: 1196px; margin: 0 auto; width: 100%; padding: 0 38px 28px; }
.weblogos-strip { display: flex; gap: 24px; align-items: center; }
.weblogo { flex: 1; display: flex; justify-content: center; align-items: center; min-width: 0; text-decoration: none; }
.weblogo img { height: 34px; max-width: 100%; object-fit: contain; opacity: 0.3; filter: grayscale(1); transition: opacity 0.2s, filter 0.2s, transform 0.22s; }
.weblogo:hover img { opacity: 1; filter: grayscale(0); transform: scale(1.14) translateY(-3px); }


/* ─── ABOUT ─── */
.about-content { max-width: 640px; }
.about-content h1 { font-size: 42px; font-weight: 800; letter-spacing: -0.03em; color: var(--text); margin-bottom: 24px; line-height: 1.1; }
.about-content p { font-size: 15px; color: var(--muted); line-height: 1.8; margin-bottom: 18px; }

/* ─── FEATURED (kept for JS compatibility) ─── */
.home-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; align-items: stretch; }
.home-grid > div { display: flex; flex-direction: column; }
#featured-container { flex: 1; display: flex; flex-direction: column; }
.featured-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; cursor: pointer; text-decoration: none; display: flex; flex-direction: column; flex: 1; overflow: hidden; transition: transform 0.2s, border-color 0.2s; }
.featured-panel:hover { transform: translateY(-3px); border-color: var(--accent); }
.featured-img { background: var(--bg); flex: 1; min-height: 120px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.featured-img img { width: 100%; height: 100%; object-fit: cover; }
.featured-badge { font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 0.14em; color: var(--accent); padding: 16px 18px 6px; text-transform: uppercase; }
.featured-body { padding: 4px 18px 24px; }
.featured-body h2 { font-size: 20px; font-weight: 800; color: var(--text); margin-bottom: 10px; line-height: 1.25; }
.featured-body p { font-size: 13px; color: var(--muted); line-height: 1.65; margin-bottom: 14px; }

/* ─── LAYOUT MODE TOGGLE ─── */
.layout-mode-btn {
  font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  color: var(--muted); background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; padding: 6px 16px; cursor: pointer; transition: border-color 0.12s, color 0.12s, background 0.12s;
}
.layout-mode-btn.active { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.layout-mode-btn:hover:not(.active) { border-color: rgba(255,255,255,0.25); color: var(--text); }
.admin-btn.active { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }

/* ─── BLOCKS EDITOR ─── */
.blocks-editor-wrap { display: flex; flex-direction: column; gap: 0; }
.block-card {
  display: flex; align-items: stretch; background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px;
  transition: border-color 0.12s;
}
.block-card:hover { border-color: rgba(255,255,255,0.15); }
.block-card-handle { padding: 14px 10px; cursor: grab; color: var(--muted); font-size: 16px; user-select: none; flex-shrink: 0; display: flex; align-items: center; }
.block-card-handle:active { cursor: grabbing; }
.block-card-body { flex: 1; padding: 12px 4px 12px 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.block-card-type { font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 0.12em; color: var(--accent); text-transform: uppercase; margin-bottom: 2px; }
.block-card-actions { display: flex; flex-direction: column; gap: 3px; padding: 8px 8px 8px 4px; flex-shrink: 0; justify-content: center; }
.block-card-btn { background: none; border: 1px solid var(--border); border-radius: 5px; color: var(--muted); font-size: 13px; width: 26px; height: 26px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: border-color 0.1s, color 0.1s; }
.block-card-btn:hover { border-color: rgba(255,255,255,0.3); color: var(--text); }
.block-card-btn.danger:hover { border-color: #c04040; color: #c04040; }
.block-add-row { display: flex; flex-wrap: wrap; gap: 7px; padding: 4px 0 0; }

/* ─── ADMIN ─── */
.admin-wrap { max-width: none; }
.admin-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.project-preview { position: sticky; top: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.project-preview-header { background: var(--bg); border-bottom: 1px solid var(--border); padding: 10px 16px; font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.1em; color: var(--accent); text-transform: uppercase; }
.project-preview-body { padding: 20px; max-height: 72vh; overflow-y: auto; }
.block-palette { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.block-add-btn { font-family: inherit; font-size: 12px; font-weight: 500; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 6px 14px; cursor: pointer; transition: border-color 0.1s, color 0.1s; }
.block-add-btn:hover { border-color: var(--accent); color: var(--accent); }
.block-list { display: flex; flex-direction: column; gap: 8px; }
.block-item { display: flex; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; transition: border-color 0.1s; }
.block-item.drag-over { border-color: var(--accent); }
.block-item.block-dragging { opacity: 0.4; }
.block-handle { padding: 14px 10px; cursor: grab; color: var(--muted); font-size: 18px; user-select: none; flex-shrink: 0; }
.block-handle:active { cursor: grabbing; }
.block-body { flex: 1; padding: 12px 0; display: flex; flex-direction: column; gap: 6px; }
.block-type-label { font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 0.12em; color: var(--accent); text-transform: uppercase; margin-bottom: 4px; }
.block-delete { padding: 12px; cursor: pointer; color: var(--muted); font-size: 18px; background: none; border: none; flex-shrink: 0; transition: color 0.1s; }
.block-delete:hover { color: #c04040; }
.pv-block { display: flex; align-items: flex-start; gap: 6px; margin-bottom: 14px; border-radius: 4px; padding: 3px 3px 3px 0; cursor: grab; }
.pv-block.pv-drag-over { outline: 2px solid var(--accent); border-radius: 4px; }
.pv-block.pv-dragging { opacity: 0.35; }
.pv-handle { font-size: 15px; color: var(--muted); opacity: 0.25; flex-shrink: 0; user-select: none; padding: 2px 3px; margin-top: 2px; transition: opacity 0.1s; }
.pv-block:hover .pv-handle { opacity: 0.8; }
.pv-content { flex: 1; min-width: 0; }
.admin-section-title { font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; margin-bottom: 16px; margin-top: 36px; }
.admin-section-title:first-child { margin-top: 0; }
.admin-project-row { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; display: flex; align-items: center; gap: 16px; padding: 14px 18px; margin-bottom: 10px; }
.admin-project-row h4 { font-size: 15px; font-weight: 600; color: var(--text); flex: 1; }
.admin-btn { font-family: inherit; font-size: 12px; font-weight: 500; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 6px 14px; cursor: pointer; transition: border-color 0.1s, color 0.1s; }
.admin-btn:hover { border-color: var(--accent); color: var(--accent); }
.admin-btn.danger:hover { border-color: #c04040; color: #c04040; }
.admin-form { display: flex; flex-direction: column; gap: 14px; }
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; }
.form-input, .form-textarea, .form-select { font-family: inherit; font-size: 14px; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; outline: none; transition: border-color 0.15s; }
.form-input:focus, .form-textarea:focus, .form-select:focus { border-color: var(--accent); }
.form-textarea { min-height: 120px; resize: vertical; }
.form-checkbox-row { display: flex; align-items: center; gap: 10px; }
.form-checkbox-row input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }
.form-checkbox-row label { cursor: pointer; }
.save-btn { display: inline-block; font-size: 14px; font-weight: 700; color: var(--bg); background: var(--accent); border: none; border-radius: 999px; padding: 11px 32px; cursor: pointer; align-self: flex-start; transition: opacity 0.15s, transform 0.15s; }
.save-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.status-msg { font-family: var(--mono); font-size: 12px; color: var(--accent); padding: 10px 0; }
.status-msg.error { color: #c04040; }

/* canvas editor */
.canvas-editor-wrap { display: flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface); margin-left: -38px; width: calc(100% + 76px); }
.canvas-sidebar { width: 240px; flex-shrink: 0; border-right: 1px solid var(--border); display: flex; flex-direction: column; min-width: 0; }
.canvas-toolbar { padding: 8px 10px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 5px; }
.canvas-add-btn { font-family: inherit; font-size: 12px; font-weight: 600; padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); cursor: pointer; text-align: left; width: 100%; transition: background 0.12s, color 0.12s, border-color 0.12s; }
.canvas-add-btn:hover { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.canvas-props { flex: 1; padding: 12px; overflow-y: auto; overflow-x: hidden; font-size: 13px; }
.canvas-props input, .canvas-props select, .canvas-props textarea { width: 100%; box-sizing: border-box; min-width: 0; }
.canvas-artboard-wrap { flex: 1; overflow: hidden; position: relative; background: #b0b0b0; min-height: 440px; }

.canvas-artboard { width: 800px; background: #ffffff; position: absolute; transform-origin: top left; }
.canvas-elem { position: absolute; cursor: move; box-sizing: border-box; overflow: hidden; }
.canvas-artboard-overlay { position: absolute; inset: 0; pointer-events: none; z-index: 9000; }
.canvas-sel-box { position: absolute; border: 2px solid #11a7f7; box-sizing: border-box; pointer-events: none; }
.rh { position: absolute; width: 10px; height: 10px; background: #11a7f7; border: 2px solid #fff; border-radius: 2px; pointer-events: all; }
.rh-nw { top:-5px; left:-5px; cursor:nw-resize; }
.rh-n  { top:-5px; left:calc(50% - 5px); cursor:n-resize; }
.rh-ne { top:-5px; right:-5px; cursor:ne-resize; }
.rh-e  { top:calc(50% - 5px); right:-5px; cursor:e-resize; }
.rh-se { bottom:-5px; right:-5px; cursor:se-resize; }
.rh-s  { bottom:-5px; left:calc(50% - 5px); cursor:s-resize; }
.rh-sw { bottom:-5px; left:-5px; cursor:sw-resize; }
.rh-w  { top:calc(50% - 5px); left:-5px; cursor:w-resize; }
.canvas-layers { width: 160px; flex-shrink: 0; border-left: 1px solid var(--border); display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.canvas-layer-list { flex: 1; overflow-y: auto; overflow-x: hidden; }
.canvas-layer-item { padding: 6px 10px; cursor: pointer; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 5px; user-select: none; font-size: 12px; white-space: nowrap; overflow: hidden; transition: background 0.1s; }
.canvas-layer-item:hover { background: rgba(255,255,255,0.06); }

.canvas-layer-item.sel { background: var(--accent); color: #fff; }
.canvas-viewer-wrap { width: 100%; overflow: hidden; position: relative; margin-bottom: 28px; }
.canvas-viewer-artboard { transform-origin: top left; position: relative; background: var(--bg); }

/* ─── MOBILE NAV HAMBURGER ─── */
.nav-hamburger {
  display: none;
  background: none; border: none; cursor: pointer;
  color: var(--muted); padding: 6px;
  margin-left: auto; flex-shrink: 0;
  align-items: center;
}
.nav-hamburger:hover { color: var(--text); }

/* Dropdown panel (injected by JS, always in DOM) */
.nav-dropdown {
  display: none;
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--nav-bg);
  flex-direction: column;
  border-bottom: 2px solid var(--border);
  z-index: 500;
}
.header-nav-bar.nav-open .nav-dropdown { display: flex; }
.nav-dropdown a {
  display: flex; align-items: center;
  height: 46px; padding: 0 20px;
  font-family: var(--mono); font-size: 13px; font-weight: 600;
  color: var(--text); text-decoration: none;
  letter-spacing: 0.05em; text-transform: lowercase;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.nav-dropdown a:last-child { border-bottom: none; }
.nav-dropdown a:hover { background: var(--surface); }
body.page-home .nav-dropdown { background: #ffffff; border-bottom-color: #e5e5e5; }
body.page-home .nav-dropdown a { color: #222; border-bottom-color: #e5e5e5; }
body.page-home .nav-dropdown a:hover { background: #f5f5f5; }

@media (max-width: 640px) {
  .nav-hamburger { display: flex; }
  .nav-auth { display: none !important; }
  /* Hide non-return-home links inside the bar — button stays visible */
  .header-nav-bar nav a:not(.return-home-btn) { display: none !important; }
}

/* ─── HOME TAGLINE ─── */
.home-tagline {
  text-align: center;
  font-size: 23px;
  font-weight: 300;
  color: #000000;
  letter-spacing: 0.04em;
  text-transform: none;
  margin: 0;
  padding-top: 40px;
}

/* ─── HOME ERASEABLE TEXT ─── */
.home-text-canvas {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 42px;
  display: block;
  z-index: 20;
  touch-action: none;
}
@media (max-width: 640px) {
  .home-text-canvas { display: none; }
}

/* ─── HOME ARROW ERASER ─── */
.home-arrow-canvas {
  position: absolute;
  left: calc(50% + 205px);
  top: -7px;
  display: block;
  z-index: 20;
  touch-action: none;
}
@media (max-width: 640px) {
  .home-arrow-canvas { display: none; }
}

/* ─── HOME NAME LOGO ─── */
.home-name-logo {
  display: flex; justify-content: center; align-items: center;
  padding: 24px 38px 0;
}
.home-name-logo img {
  max-width: 300px; width: 100%; height: auto;
}
@media (max-width: 540px) {
  .home-name-logo { padding: 20px 20px 0; }
  .home-name-logo img { max-width: 188px; }
}

/* ─── HOME TABS ─── */
.home-tabs-container {
  max-width: 1196px; margin: 0 auto; padding: 16px 38px;
}
.home-tab {
  display: block; width: 100%; text-decoration: none;
  border: 2.25px solid #5a3a1a; border-radius: 18px;
  overflow: hidden; background: #f5f5f5;
  transition: border-color 0.15s, transform 0.15s;
}
.home-tab:hover {
  border-color: #bbb;
  transform: translateY(-2px);
}
.home-tab:active { transform: translateY(0); }
.home-tab-img-wrap {
  width: 100%;
  aspect-ratio: 19/5;
  overflow: hidden;
  background: #efefef;
}
.home-tab-img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center 27%; }
@media (max-width: 768px) { .home-tabs-container { padding: 16px 20px; } }
@media (max-width: 540px) { .home-tabs-container { padding: 14px 16px; } }

/* ─── FOOTER BUTTONS ─── */
.footer-btns { display: flex; justify-content: center; gap: 12px; padding: 8px 0 4px; flex-wrap: wrap; }
.bmc-btn, .nl-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 10px 22px; border: 1.5px solid #111; border-radius: 999px;
  font-size: 14px; font-weight: 600; color: #111; text-decoration: none;
  background: transparent; cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  white-space: nowrap; font-family: inherit; min-width: 200px;
}
.bmc-btn img, .nl-btn img { height: 26px; width: auto; }
.bmc-btn:hover, .nl-btn:hover { background: rgba(0,0,0,0.05); transform: translateY(-1px); }
.bmc-btn:active, .nl-btn:active { transform: translateY(1px); background: rgba(0,0,0,0.08); }

/* ─── NEWSLETTER MODAL ─── */
.nl-modal {
  display: none; position: fixed; inset: 0; z-index: 9000;
  align-items: center; justify-content: center;
}
.nl-modal.open { display: flex; }
.nl-modal-bg {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(4px);
}
.nl-modal-box {
  position: relative; z-index: 1;
  background: #fff; border-radius: 16px;
  padding: 36px 32px 28px; max-width: 480px; width: 90%;
  box-shadow: 0 8px 40px rgba(0,0,0,0.22);
  max-height: 90vh; overflow-y: auto;
}
.nl-modal-close {
  position: absolute; top: 14px; right: 18px;
  background: none; border: none; font-size: 22px; cursor: pointer;
  color: #555; line-height: 1; padding: 4px 6px; border-radius: 6px;
  transition: background 0.1s;
}
.nl-modal-close:hover { background: rgba(0,0,0,0.07); }

.grecaptcha-badge { visibility: hidden !important; }

/* ─── FOOTER ─── */
footer { background: var(--bg); padding: 10px 0 10px; margin-top: auto; }
.footer-inner {
  max-width: 1196px; margin: 0 auto; padding: 10px 38px 0;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 6px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-logo { display: flex; align-items: center; text-decoration: none; }
.footer-logo img {
  height: 20px; width: auto; object-fit: contain;
  filter: grayscale(1) brightness(0.55); opacity: 0.7;
  transition: filter 0.2s, opacity 0.2s;
}
.footer-logo:hover img { filter: none; opacity: 1; }
.footer-sep { font-size: 14px; color: var(--muted); line-height: 1; }
.footer-page-name { font-family: var(--mono); font-size: 12px; color: var(--text); letter-spacing: 0.04em; }
.footer-sitemap { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-sitemap a {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.04em; color: var(--muted);
  text-decoration: none; transition: color 0.1s;
}
.footer-sitemap a:hover { color: #ffffff; }
.footer-contact { font-family: var(--mono); font-size: 17px; color: var(--muted); letter-spacing: 0.03em; text-align: center; }
.footer-contact a { color: var(--muted); text-decoration: none; transition: color 0.1s; }
.footer-contact a:hover { color: var(--text); }

/* ─── UTILITY ─── */
.hidden { display: none !important; }

/* ─── RESPONSIVE ─── */

/* Home page: inner sections manage their own padding */
body.page-home:not(.page-appstore) main { padding: 0 0 60px; }

@media (max-width: 900px) {
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .header-top-inner { padding: 0 20px; }
  .header-nav-inner { padding: 0 20px; }
  #auth-user { display: none; }
  main { padding: 28px 20px 60px; }
  .weblogos-bar { padding: 0 20px 20px; }
  .footer-inner { padding: 8px 20px 0; }
  .canvas-editor-wrap { margin-left: -20px; width: calc(100% + 40px); }
  body.page-home:not(.page-appstore) main { padding: 0 0 48px; }
}

@media (max-width: 640px) {
  .header-nav-bar nav a.return-home-btn {
    font-size: 16px !important;
    padding: 0 33px !important;
  }
  body.page-home .header-nav-bar nav a.return-home-btn img {
    height: 54px;
  }
}

@media (max-width: 540px) {
  .header-top { padding: 6px 0 8px; }
  .header-top-inner { padding: 0 16px; gap: 6px; }
  .header-nav-inner { padding: 0 16px; }
  .logo-box { height: 20px; margin-right: 12px; }
  .quicknav-wrap { display: none; }
  .search-pill-wrap { flex: 1; }
  .header-nav-bar nav { overflow-x: visible; }
  .hero { padding: 44px 0 36px; }
  .hero-inner { padding: 0 16px; }
  .hero-tagline { font-size: 38px; }
  .hero-accent { font-size: 56px; background-attachment: scroll; background-repeat: repeat; }
  .tc-card { width: 140px; height: 230px; }
  .tc-card-icon { width: 74px; height: 74px; margin-top: 22px; }
  main { padding: 20px 14px 48px; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cat-card { padding: 18px 14px 16px; min-height: 130px; }
  .cat-name { font-size: 15px; }
  .project-thumb { width: 80px; height: 80px; }
  .project-row { height: 80px; }
  .project-info { padding: 12px 14px; }
  .footer-inner { padding: 8px 16px 0; gap: 5px; }
  .admin-editor { grid-template-columns: 1fr; }
  .project-preview { position: static; }
  .weblogos-bar { padding: 0 14px 18px; }
  .weblogos-strip { gap: 14px; }
  body.page-home:not(.page-appstore) main { padding: 0 0 40px; }
}

@media (max-width: 400px) {
  .header-nav-bar nav a.return-home-btn {
    font-size: 14px !important;
    padding: 0 21px !important;
  }
  body.page-home .header-nav-bar nav a.return-home-btn img {
    height: 42px;
  }
  .home-name-logo img { max-width: 150px; }
  main { padding: 14px 10px 40px; }
}
