/* ============================================
   YohApps — Stylesheet
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
  --color-bg: #0f0f13;
  --color-bg-alt: #16161d;
  --color-bg-elevated: rgba(255, 255, 255, 0.04);
  --color-text: #f0f0f5;
  --color-text-secondary: #a0a0b8;
  --color-text-muted: #606075;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-strong: rgba(255, 255, 255, 0.14);
  --color-accent: #5b8fee;
  --color-accent-hover: #7aaaf5;
  --color-accent-soft: rgba(91, 143, 238, 0.12);

  --font-sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", Consolas, monospace;

  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  --container-max: 1100px;
  --header-height: 72px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);

  /* Stone texture used as page background */
  --bg-texture: url("assets/banners/bg-texture.png");
}

/* Light theme overrides */
[data-theme="light"] {
  --color-bg: #f8f8fc;
  --color-bg-alt: #f0f0f5;
  --color-bg-elevated: #ffffff;
  --color-text: #1a1a2e;
  --color-text-secondary: #4a4a6a;
  --color-text-muted: #9090b0;
  --color-border: #e2e2ec;
  --color-border-strong: #c8c8dc;
  --color-accent: #2563eb;
  --color-accent-hover: #1d4ed8;
  --color-accent-soft: #eff6ff;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  /* Subtle banner texture as page background */
  background-image: var(--bg-texture);
  background-size: auto;
  background-position: center top;
  background-attachment: fixed;
  background-repeat: repeat;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  position: relative;
}
/* Dark overlay so text stays readable over the texture */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--color-bg);
  opacity: 0.88;
  z-index: 0;
  pointer-events: none;
}
/* Light theme: heavier overlay so bg isn't distracting */
[data-theme="light"] body::before {
  opacity: 0.94;
}

/* ============================================================
   FIX #6 — background-attachment: fixed is broken on iOS Safari.
   During momentum scroll it renders incorrectly or as solid color.
   Switch to scroll on mobile/tablet.
   ============================================================ */
@media (max-width: 900px) {
  body {
    background-attachment: scroll;
  }
}

/* Everything needs z-index above the overlay */
.header,
.main,
.footer {
  position: relative;
  z-index: 1;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.15s;
}
a:hover {
  color: var(--color-accent-hover);
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
}
ul,
ol {
  list-style: none;
}

/* ============================================================
   FIX #7 — <pre> blocks in chess-melody app detail have no CSS.
   Browser default (white-space: pre, no overflow) causes
   page-wide horizontal scroll on iPhone. Fix with pre-wrap + overflow.
   ============================================================ */
pre {
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.6;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin: var(--space-md) 0;
}
[data-theme="light"] pre {
  background: #f0f0f5;
}

/* ---------- Container ---------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 15, 19, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
  min-height: var(--header-height);
  height: auto;
}
[data-theme="light"] .header {
  background: rgba(248, 248, 252, 0.88);
}
.header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

/* Second-line app menu inside header (ONE LINE, FULL WIDTH) */
.app-subnav {
  width: 100%;
  border-top: 1px solid var(--color-border);
}

.app-subnav-inner {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-sm) var(--space-lg);

  display: flex;
  justify-content: center;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;

  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap;
}

/* ============================================================
   FIX #2 — justify-content: center on an overflowing flex
   container clips items symmetrically. On iPhone with 10 items
   the first 2-3 links (ChessMelody, ChessMouseSpeed) become
   unreachable because the user can scroll right but not left
   past the start. Switch to flex-start on narrow screens.
   ============================================================ */
@media (max-width: 900px) {
  .app-subnav-inner {
    justify-content: flex-start;
  }
}

.app-subnav a {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;

  font-size: 0.92rem;
  padding: 6px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--color-text-secondary);
  background: transparent;
  opacity: 0.95;
  transition:
    opacity 0.15s,
    background 0.15s,
    color 0.15s;
}

.app-subnav a:hover {
  opacity: 1;
  color: var(--color-text);
  background: var(--color-bg-elevated);
}

.app-subnav a.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* Optional: hide scrollbar (keeps scrolling working) */
.app-subnav-inner::-webkit-scrollbar {
  height: 0;
}
.app-subnav-inner {
  scrollbar-width: none;
}

.app-page {
  display: none;
  padding: 60px 0;
}

.app-page:target {
  display: block;
}

.app-page-section h2 {
  text-align: center;
  margin-bottom: 1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.app-page-card .app-status-badge {
  margin-bottom: 2rem;
}

/* ==========================================
   App Detail — Full Width Status Bar
   ========================================== */

.app-status-badge {
  width: 100%;
  text-align: center;
  padding: 12px 0;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 0;
}

/* LIVE */
.app-status-badge.app-status--live {
  background: linear-gradient(90deg, #1d4ed8, #3b82f6);
  color: #ffffff;
}

/* APPROVED */
.app-status-badge.app-status--approved {
  background: linear-gradient(90deg, #15803d, #22c55e);
  color: #ffffff;
}

/* IN PROGRESS */
.app-status-badge.app-status--in-progress,
.app-status-badge.app-status--progress {
  background: linear-gradient(90deg, #1f2328, #2d333b);
  color: #c9d1d9;
}

/* CLOSED TESTING */
.app-status--closed-testing,
.app-status-badge.app-status--closed-testing {
  background: linear-gradient(90deg, #6d28d9, #8b5cf6);
  color: #ffffff;
}

/* IN DEVELOPMENT */
.app-status--development,
.app-status-badge.app-status--development {
  background: linear-gradient(90deg, #b45309, #f59e0b);
  color: #ffffff;
}

/* PROTOTYPE WORKING */
.app-status--prototype,
.app-status-badge.app-status--prototype {
  background: linear-gradient(90deg, #0f766e, #14b8a6);
  color: #ffffff;
}

/* ==========================================
   Developer News Styling
   ========================================== */

.app-news-section {
  max-width: 700px;
  margin: 0 auto;
  margin-top: 2rem;
}

.news-block {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.news-platform {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0.75rem;
}

.news-platform-title {
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--color-text-secondary);
}

/* Platform icons (Android / iOS SVG files) */
.news-platform-icon {
  width: 20px;
  height: 20px;
  display: block;
}

/* Android tint */
.news-block--android .news-platform-icon {
  filter: invert(57%) sepia(86%) saturate(384%) hue-rotate(76deg)
          brightness(95%) contrast(90%);
}

/* Apple tint (dark theme default) */
.news-block--ios .news-platform-icon {
  filter: invert(100%);
}

/* Apple in light theme */
[data-theme="light"] .news-block--ios .news-platform-icon {
  filter: invert(0%);
}

.news-block p {
  margin-bottom: 0.75rem;
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.news-contact {
  margin-top: 2.5rem;
  text-align: center;
}

.news-email {
  margin-top: 0.5rem;
  font-size: 0.95rem;
}

.news-proof-image {
  display: block;
  max-width: 660px;
  width: 100%;
  margin-top: 16px;
  border-radius: 12px;
  opacity: 0.95;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.app-live-section {
  text-align: center;
  margin-bottom: 3rem;
}

.app-page-screenshot {
  width: 100%;
  max-width: 900px;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.app-gallery-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .app-gallery-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.app-gallery-grid img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.audio-demo {
  margin-bottom: 1.5rem;
}

.audio-demo audio {
  width: 100%;
  max-width: 500px;
}

.app-logo-section {
  text-align: center;
}

.app-page-logo {
  max-width: 150px;
  width: 100%;
  margin: 0 auto 2rem;
  display: block;
  border-radius: 16px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.4);
}

/* Logo — larger, cleaner brand presence */
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  color: var(--color-text);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.logo:hover {
  color: var(--color-text);
}

.logo-img-wrap {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
  background: transparent;
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
}

/* === Profile Section (Built by Yohann) === */

.profile-item {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.profile-icon {
  color: var(--color-accent);
  font-size: 0.9rem;
  margin-top: 4px;
  flex-shrink: 0;
}

.profile-item h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  color: var(--color-text);
}

.profile-item p {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.coaching-links {
  display: flex;
  gap: var(--space-lg);
  flex-wrap: wrap;
  margin-top: var(--space-md);
}

.article-links {
  margin-top: var(--space-lg);
}

.article-links h4 {
  margin-bottom: var(--space-sm);
}

.article-links ul {
  padding-left: 18px;
}

.article-links li {
  margin-bottom: 6px;
  font-size: 0.85rem;
}

/* ===== Contact Section ===== */

.contact-section {
  margin-top: 32px;
}

.contact-title {
  margin-bottom: 10px;
  font-weight: 600;
}

.contact-links {
  margin-left: 28px;
}

.contact-item {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

/* ---------- Legal ---------- */

.legal-wrapper {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-3xl) var(--space-lg);
}

.legal-back-link {
  display: inline-block;
  margin-bottom: var(--space-lg);
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.legal-back-link:hover {
  color: var(--color-accent);
}

.legal-title {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.legal-subtitle {
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  margin-bottom: var(--space-xl);
}

.legal-wrapper h2 {
  margin-top: var(--space-xl);
  font-size: 1.0625rem;
  font-weight: 600;
}

.legal-wrapper p {
  margin-top: var(--space-sm);
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.legal-contact {
  margin-top: var(--space-2xl);
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* ---------- Nav ---------- */
.nav {
  flex: 1;
  display: flex;
  justify-content: center;
}
.nav-list {
  display: flex;
  gap: var(--space-xs);
}
.nav-link {
  display: block;
  padding: var(--space-sm) var(--space-md);
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}
.nav-link:hover {
  color: var(--color-text);
  background: var(--color-bg-elevated);
}
.nav-link.active {
  color: var(--color-accent);
  background: var(--color-accent-soft);
}

.sound-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  font-size: 1.125rem;
  transition: all 0.15s;
}
.sound-toggle:hover {
  background: var(--color-bg-elevated);
  color: var(--color-text);
}
.sound-icon-off {
  display: none;
  color: var(--color-text-muted);
}
.sound--muted .sound-icon-on {
  display: none;
}
.sound--muted .sound-icon-off {
  display: block;
}

.theme-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  transition: all 0.15s;
}
.theme-toggle:hover {
  background: var(--color-bg-elevated);
  color: var(--color-text);
}
.theme-icon-light,
.theme-icon-dark {
  font-size: 1.25rem;
}
[data-theme="light"] .theme-icon-dark {
  display: none;
}
[data-theme="dark"] .theme-icon-light {
  display: none;
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 10px;
}
.mobile-menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-text);
  transition: all 0.2s;
}

/* ---------- Main / Sections ---------- */
.main {
  min-height: calc(100vh - var(--header-height) - 80px);
}
.section {
  display: none;
  padding: var(--space-3xl) 0;
}
.section.active {
  display: block;
}
.section-header {
  margin-bottom: var(--space-2xl);
}
.page-title {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
}
.page-description {
  color: var(--color-text-secondary);
  font-size: 1.0625rem;
  max-width: 600px;
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 0 0 var(--space-2xl);
  max-width: 760px;
  max-width: 100%;
}
.hero-banner {
  width: 100%;
  max-width: 720px;
  margin: 0 auto var(--space-xl);
  border-radius: var(--radius-lg);
  object-fit: cover;
  box-shadow: var(--shadow-lg);
}
.hero-title {
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: var(--space-md);
  display: none;
}
.hero-subtitle {
  color: var(--color-text-secondary);
  font-size: 1.125rem;
  margin-bottom: var(--space-xl);
}
.hero-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}
.coming-soon-tag {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.7);
}
[data-theme="light"] .coming-soon-tag {
  background: rgba(0, 0, 0, 0.08);
  color: var(--color-text-muted);
}

/* ---------- Built by Yohann ---------- */
.built-by {
  max-width: 680px;
  margin: var(--space-2xl) auto;
  padding: var(--space-2xl);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
}
[data-theme="light"] .built-by {
  background: #fff;
}
.built-by-title {
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
}
.built-by-body {
  color: var(--color-text-secondary);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: var(--space-md);
}
.highlight-box {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--color-accent-soft);
  border: 1px solid rgba(91, 143, 238, 0.3);
  border-radius: var(--radius-md);
  margin-top: var(--space-md);
}
.highlight-box-icon {
  color: var(--color-accent);
  font-size: 1.125rem;
  flex-shrink: 0;
  margin-top: 3px;
}
.highlight-box-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.highlight-box-heading {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--color-text);
}
.highlight-box p {
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
  line-height: 1.5;
}
.highlight-box-link {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-top: 4px;
  transition: color 0.15s;
}
.highlight-box-link:hover {
  color: var(--color-accent-hover);
}

/* ---------- Home Projects ---------- */
.home-projects {
  margin: var(--space-2xl) 0;
}
.home-projects-title {
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-xl);
}

/* ---------- Pre-sale Section ---------- */
.presale-section {
  margin: var(--space-2xl) 0;
  padding: var(--space-2xl);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
}
[data-theme="light"] .presale-section {
  background: #fff;
}
.presale-section-title {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
}
.presale-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

/* ============================================================
   FIX #1 — Fixed 320px height means two stacked images occupy
   640px on iPhone before any text, dominating the viewport.
   Reduce on mobile.
   ============================================================ */
.presale-img {
  width: 100%;
  height: 320px;
  border-radius: var(--radius-md);
  object-fit: cover;
  object-position: center;
  background: var(--color-bg-alt);
}
@media (max-width: 768px) {
  .presale-img {
    height: 200px;
  }
}

/* Adjust ONLY the right image focal point */
.presale-img--right {
  object-position: center 25%;
}
.presale-content {
  max-width: 560px;
}
.presale-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
}
.presale-body {
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
  line-height: 1.7;
  margin-bottom: var(--space-lg);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all 0.15s;
  white-space: nowrap;
}
.btn--primary {
  background: var(--color-accent);
  color: #fff;
}
.btn--primary:hover {
  background: var(--color-accent-hover);
  color: #fff;
}
.btn--secondary {
  background: var(--color-bg-elevated);
  color: var(--color-text);
  border: 1px solid var(--color-border-strong);
}
.btn--secondary:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-accent-soft);
}

/* ---------- App Cards ---------- */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
}
.app-card {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  backdrop-filter: blur(8px);
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
[data-theme="light"] .app-card {
  background: #fff;
}
.app-card:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-sm);
}
.app-card-header {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  align-items: flex-start;
}
.app-icon-wrap {
  flex-shrink: 0;
}
.app-icon-img {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  background: var(--color-bg-alt);
}
.app-icon,
.app-icon--emoji {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--color-accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.app-meta {
  flex: 1;
  min-width: 0;
}
.app-name {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

/* Status badges */
.app-status {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}
.app-status--in-progress {
  background: rgba(234, 179, 8, 0.15);
  color: #d97706;
}
[data-theme="light"] .app-status--in-progress {
  background: #fef3c7;
  color: #92400e;
}
.app-status--approved {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
}
[data-theme="light"] .app-status--approved {
  background: #dcfce7;
  color: #166534;
}
.app-status--live {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}
[data-theme="light"] .app-status--live {
  background: #dbeafe;
  color: #1d4ed8;
}

.app-description {
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
  margin-bottom: var(--space-md);
}

/* Progress notes — shown under description */
.app-note {
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: 6px;
}
.app-note--approved {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
  border-left: 3px solid #16a34a;
}
[data-theme="light"] .app-note--approved {
  background: #f0fdf4;
  color: #166534;
}
.app-note--progress {
  background: rgba(234, 179, 8, 0.08);
  color: #ca8a04;
  border-left: 3px solid #ca8a04;
}
[data-theme="light"] .app-note--progress {
  background: #fffbeb;
  color: #92400e;
}
.app-note--live {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  border-left: 3px solid #3b82f6;
}
[data-theme="light"] .app-note--live {
  background: #eff6ff;
  color: #1d4ed8;
}

/* Links row */
.app-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* ============================================================
   FIX #4 — .app-link had padding: 4px 10px (~24px tall).
   Apple HIG and WCAG recommend 44px minimum touch target.
   Increased to 8px 12px for comfortable tap on all devices.
   ============================================================ */
.app-link {
  display: inline-flex;
  align-items: center;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-accent);
  padding: 8px 12px;
  background: var(--color-accent-soft);
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}
.app-link:hover {
  background: var(--color-accent);
  color: #fff;
}
.app-link--disabled {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}
.app-link--website {
}

/* Gallery button */
.gallery-btn {
  display: inline-flex;
  align-items: center;
  margin-top: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}
.gallery-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-accent-soft);
}

/* ---------- Filter Bar ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}
.filter-btn {
  padding: var(--space-sm) var(--space-md);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all 0.15s;
  cursor: pointer;
}
.filter-btn:hover {
  border-color: var(--color-border-strong);
  color: var(--color-text);
}
.filter-btn.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

/* ---------- Concepts ---------- */
.concepts-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.concept-card {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  backdrop-filter: blur(8px);
  transition: border-color 0.15s;
}
[data-theme="light"] .concept-card {
  background: #fff;
}
.concept-card:hover {
  border-color: var(--color-border-strong);
}
.concept-header {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  align-items: flex-start;
}
.concept-name {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}
.concept-status {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.concept-status--in-progress {
  background: rgba(234, 179, 8, 0.15);
  color: #d97706;
}
[data-theme="light"] .concept-status--in-progress {
  background: #fef3c7;
  color: #92400e;
}
.concept-description {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
}

/* ---------- Dev Tools ---------- */
.devtools-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
}
.devtools-category {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  backdrop-filter: blur(8px);
}
[data-theme="light"] .devtools-category {
  background: #fff;
}
.devtools-category h3 {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--color-border);
}
.devtools-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-md);
}
.devtool-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
}
[data-theme="light"] .devtool-item {
  background: #f8f8fc;
}
.devtool-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--color-bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--color-accent);
  flex-shrink: 0;
  border: 1px solid var(--color-border);
}
.devtool-name {
  font-weight: 600;
  margin-bottom: 2px;
}
.devtool-reason {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

/* ---------- Posts ---------- */
.posts-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.post-card {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
[data-theme="light"] .post-card {
  background: #fff;
}
.post-card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-sm);
}
.post-date {
  font-size: 0.8125rem;
  font-family: var(--font-mono);
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
  display: block;
}
.post-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}
.post-summary {
  color: var(--color-text-secondary);
}
.post-read-more {
  display: inline-block;
  margin-top: var(--space-md);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-accent);
}

/* ---------- Forum ---------- */
.forum-banner {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--color-accent-soft);
  border: 1px solid rgba(91, 143, 238, 0.25);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-2xl);
}
.forum-banner-icon {
  font-size: 1.5rem;
}
.forum-banner p {
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
}
.forum-content {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: var(--space-xl);
}
.forum-categories {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.forum-category {
  padding: var(--space-md);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s;
  backdrop-filter: blur(8px);
}
[data-theme="light"] .forum-category {
  background: #fff;
}
.forum-category:hover,
.forum-category.active {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}
.forum-category-name {
  font-weight: 600;
  margin-bottom: 2px;
}
.forum-category-count {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}
.forum-threads {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.forum-thread {
  padding: var(--space-lg);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
}
[data-theme="light"] .forum-thread {
  background: #fff;
}
.forum-thread-title {
  font-weight: 600;
  margin-bottom: var(--space-sm);
}
.forum-thread-meta {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  display: flex;
  gap: var(--space-md);
}
.forum-thread-preview {
  margin-top: var(--space-sm);
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
}

/* ---------- About ---------- */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--space-3xl);
  align-items: start;
}
.about-bio {
  margin-bottom: var(--space-2xl);
}
.about-bio p {
  font-size: 1.0625rem;
  margin-bottom: var(--space-md);
  color: var(--color-text-secondary);
}
.about-philosophy h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: var(--space-lg);
}
.philosophy-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.philosophy-list li {
  padding-left: var(--space-lg);
  position: relative;
  color: var(--color-text-secondary);
}
.philosophy-list li::before {
  content: "◈";
  position: absolute;
  left: 0;
  color: var(--color-accent);
}
.philosophy-list strong {
  color: var(--color-text);
}
.about-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}
.about-card {
  padding: var(--space-lg);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
}
[data-theme="light"] .about-card {
  background: #fff;
}
.about-card h3 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}
.about-card p {
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
}
.connect-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.connect-list li {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.connect-icon {
  color: var(--color-accent);
  font-family: var(--font-mono);
}
.connect-list .email {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}
.resume-note {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
  font-size: 0.875rem;
  color: var(--color-text-muted);
  font-style: italic;
}

/* ---------- Post Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
}
.modal.active {
  opacity: 1;
  visibility: visible;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}
.modal-content {
  position: relative;
  width: 90%;
  max-width: 700px;
  max-height: 85vh;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform 0.2s;
}
[data-theme="light"] .modal-content {
  background: #fff;
}
.modal.active .modal-content {
  transform: translateY(0);
}
.modal-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--color-text-muted);
  border-radius: var(--radius-md);
  transition: all 0.15s;
}
.modal-close:hover {
  background: var(--color-bg-elevated);
  color: var(--color-text);
}
.modal-article {
  padding: var(--space-2xl);
}
.modal-header {
  margin-bottom: var(--space-xl);
}
.modal-date {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  display: block;
  margin-bottom: var(--space-sm);
}
.modal-title {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.modal-body {
  color: var(--color-text-secondary);
  line-height: 1.7;
}
.modal-body p {
  margin-bottom: var(--space-md);
}
.modal-body h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--color-text);
  margin: var(--space-xl) 0 var(--space-md);
}
.modal-body ul {
  margin: var(--space-md) 0;
  padding-left: var(--space-xl);
}
.modal-body li {
  list-style: disc;
  margin-bottom: var(--space-sm);
}

/* ---------- Gallery Modal ---------- */
.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
}
.gallery-modal.active {
  opacity: 1;
  visibility: visible;
}
.gallery-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
}
.gallery-modal-content {
  position: relative;
  width: 90%;
  max-width: 900px;
  max-height: 85vh;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
  padding: var(--space-xl);
  transform: translateY(20px);
  transition: transform 0.2s;
}
[data-theme="light"] .gallery-modal-content {
  background: #fff;
}
.gallery-modal.active .gallery-modal-content {
  transform: translateY(0);
}
.gallery-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--color-text-muted);
  border-radius: var(--radius-md);
  transition: all 0.15s;
  z-index: 10;
}
.gallery-close:hover {
  background: var(--color-bg-elevated);
  color: var(--color-text);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--space-md);
  padding-top: var(--space-lg);
}
.gallery-thumb {
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  background: var(--color-bg-alt);
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}
.gallery-thumb:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-md);
}
.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Gallery Viewer ---------- */
.gallery-viewer {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
}
.gallery-viewer.active {
  opacity: 1;
  visibility: visible;
}
.gallery-viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
}
.gallery-viewer-close {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  z-index: 10;
  transition: background 0.15s;
}
.gallery-viewer-close:hover {
  background: rgba(255, 255, 255, 0.2);
}
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  z-index: 10;
  transition: background 0.15s;
}
.gallery-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}
.gallery-prev {
  left: var(--space-lg);
}
.gallery-next {
  right: var(--space-lg);
}
.gallery-viewer-container {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.gallery-viewer-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-md);
}
.gallery-counter {
  margin-top: var(--space-md);
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-xl) 0;
  margin-top: var(--space-3xl);
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
}
[data-theme="light"] .footer {
  background: rgba(248, 248, 252, 0.8);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
}
.footer-copy {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}
.footer-tagline {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  font-style: italic;
}
.footer-legal-link {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}
.footer-legal-link:hover {
  color: var(--color-accent);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .forum-content {
    grid-template-columns: 1fr;
  }
  .forum-categories {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .forum-category {
    flex: 1 1 auto;
    min-width: 130px;
  }
  .about-layout {
    grid-template-columns: 1fr;
  }
  .about-sidebar {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .about-card {
    flex: 1 1 200px;
  }
}
@media (max-width: 768px) {
  :root {
    --header-height: 56px;
  }

  /* ============================================================
     FIX #3 — Increase .nav-link touch targets on mobile.
     Original padding: 8px 16px = ~32px height.
     Apple HIG recommends 44px minimum.
     ============================================================ */
  .nav-link {
    padding: 0.75rem 1rem;
  }

  /* ============================================================
     FIX #3 (filter bar) — Same touch target fix for filter buttons.
     ============================================================ */
  .filter-btn {
    padding: 0.75rem 1rem;
  }

  .nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(15, 15, 19, 0.96);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-md);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    /* ============================================================
       FIX #8 — position: fixed removes the element from the
       header's stacking context (z-index: 100). Without an explicit
       z-index the nav can render behind page content on some devices.
       ============================================================ */
    z-index: 99;
  }
  [data-theme="light"] .nav {
    background: rgba(248, 248, 252, 0.97);
  }
  .nav.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  .nav-list {
    flex-direction: column;
    gap: var(--space-xs);
  }
  .mobile-menu-btn {
    display: flex;
  }
  .mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
  }
  .mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
  .page-title {
    font-size: 1.75rem;
  }
  .hero-title {
    font-size: 2rem;
  }
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  .apps-grid {
    grid-template-columns: 1fr;
  }
  .devtools-list {
    grid-template-columns: 1fr;
  }
  .presale-section,
  .built-by {
    padding: var(--space-lg);
  }
  .gallery-prev {
    left: var(--space-sm);
  }
  .gallery-next {
    right: var(--space-sm);
  }
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ---------- Focus & Selection ---------- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
::selection {
  background: var(--color-accent);
  color: #fff;
}

/* ===== Layout Grid ===== */

.layout {
  display: grid;
  grid-template-columns: 200px 1fr 300px;
  gap: 40px;
  max-width: 1500px;
  margin: 0 auto;
  padding: 40px 24px;
}

.layout-content {
  min-width: 0;
}

.layout-left {
  position: sticky;
  top: calc(var(--header-height) + 40px);
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.layout-right {
  position: sticky;
  top: calc(var(--header-height) + 40px);
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Sidebar cards */

.sidebar-card {
  padding: 20px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  backdrop-filter: blur(8px);
}

.sidebar-card h3 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 12px;
  color: var(--color-text-muted);
}

.sidebar-card p {
  font-size: 0.875rem;
  margin-bottom: 16px;
}

/* PayPal */

.support-box {
  text-align: center;
}

.support-box img {
  max-width: 100%;
  transform: scale(1.1);
  transition: transform 0.2s ease;
}

.support-box img:hover {
  transform: scale(1.15);
}

/* YouTube Button */

.sidebar-youtube-btn {
  display: block;
  width: 100%;
  padding: 12px 16px;
  background: #ff0000;
  color: #ffffff;
  text-align: center;
  font-weight: 600;
  border-radius: 8px;
  transition: opacity 0.15s;
}

.sidebar-youtube-btn:hover {
  opacity: 0.85;
  color: #ffffff;
}

.sidebar-note {
  margin-top: 12px;
  font-size: 0.75rem;
  text-align: center;
  opacity: 0.7;
}

/* ===== Responsive ===== */

@media (max-width: 1100px) {
  .layout {
    grid-template-columns: 1fr 280px;
  }

  .layout-left {
    display: none;
  }
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .layout-left {
    display: none;
  }

  .layout-right {
    position: relative;
    top: 0;
    order: 2;
  }

  .layout-content {
    order: 1;
  }
}

/* ===== Left Sidebar News ===== */

.news-card {
  padding: 20px;
}

.news-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.news-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.news-item--live .news-dot {
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

.news-item--milestone .news-dot {
  background: #3b82f6;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.6);
}

.news-title {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--color-text);
}

.news-desc {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.news-divider {
  height: 1px;
  background: var(--color-border);
  margin: 16px 0;
}
