/* ============================================================
   NOOR — Islamic Glass Theme for hilmy.app
   iPadOS Glassmorphism + Islamic Geometric Elegance
   ============================================================ */

/* ── FONTS ─────────────────────────────────────────────────── */
/* Amiri: Arabic-heritage serif | Cormorant Garamond: Elegant latin | DM Sans: UI */

/* ── CSS VARIABLES ──────────────────────────────────────────── */
:root {
  /* Palette — Midnight Emerald */
  --bg-deep:        #050c14;
  --bg-mid:         #071420;
  --bg-surface:     #0a1d2e;

  --emerald:        #0ea5a0;
  --emerald-bright: #14d4cc;
  --emerald-dim:    #0a7572;
  --gold:           #c9983a;
  --gold-bright:    #e8b84b;
  --gold-dim:       #8a6520;
  --sapphire:       #3b7dd8;
  --rose:           #c0596b;

  --text-primary:   #f0ece4;
  --text-secondary: #9eb3bc;
  --text-muted:     #4a6270;

  /* Glass */
  --glass-bg:       rgba(10, 30, 50, 0.55);
  --glass-bg-light: rgba(15, 40, 65, 0.45);
  --glass-border:   rgba(80, 180, 170, 0.18);
  --glass-border-gold: rgba(200, 152, 58, 0.22);
  --glass-blur:     blur(20px) saturate(180%);
  --glass-blur-sm:  blur(12px) saturate(160%);

  /* Spacing */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  1.75rem;
  --space-lg:  3rem;
  --space-xl:  5rem;
  --space-2xl: 8rem;

  /* Typography */
  --font-display: 'Amiri', 'Georgia', serif;
  --font-serif:   'Cormorant Garamond', 'Georgia', serif;
  --font-ui:      'DM Sans', system-ui, sans-serif;

  /* Radius */
  --radius-sm:  10px;
  --radius-md:  16px;
  --radius-lg:  24px;
  --radius-xl:  36px;
  --radius-full: 9999px;

  /* Transitions */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --transition:  0.3s var(--ease-out);
}

/* ── RESET & BASE ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-deep);
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--emerald-bright); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-bright); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ── BACKGROUND LAYERS ──────────────────────────────────────── */
.geo-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.geo-layer {
  position: absolute;
  inset: 0;
}

.geo-layer-1 {
  background:
    radial-gradient(ellipse 80% 50% at 20% 10%, rgba(14, 165, 160, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 70% at 80% 80%, rgba(59, 125, 216, 0.1) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 60% 30%, rgba(201, 152, 58, 0.06) 0%, transparent 50%);
}

.geo-layer-2 {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cg fill='none' stroke='rgba(14,165,160,0.06)' stroke-width='0.5'%3E%3Cpolygon points='40,5 72,20 72,60 40,75 8,60 8,20'/%3E%3Cpolygon points='40,15 62,25 62,55 40,65 18,55 18,25'/%3E%3Cline x1='40' y1='5' x2='40' y2='15'/%3E%3Cline x1='72' y1='20' x2='62' y2='25'/%3E%3Cline x1='72' y1='60' x2='62' y2='55'/%3E%3Cline x1='40' y1='75' x2='40' y2='65'/%3E%3Cline x1='8' y1='60' x2='18' y2='55'/%3E%3Cline x1='8' y1='20' x2='18' y2='25'/%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.6;
}

.noise-overlay {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  opacity: 0.5;
}

/* ── FLOATING ORBS ──────────────────────────────────────────── */
.orbs { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: orb-float 20s ease-in-out infinite;
  will-change: transform;
}

.orb-1 {
  width: 600px; height: 600px;
  top: -200px; left: -100px;
  background: radial-gradient(circle, rgba(14, 165, 160, 0.15) 0%, transparent 70%);
  animation-duration: 25s;
}

.orb-2 {
  width: 500px; height: 500px;
  bottom: -150px; right: -100px;
  background: radial-gradient(circle, rgba(59, 125, 216, 0.12) 0%, transparent 70%);
  animation-delay: -8s; animation-duration: 20s;
}

.orb-3 {
  width: 400px; height: 400px;
  top: 40%; left: 60%;
  background: radial-gradient(circle, rgba(201, 152, 58, 0.08) 0%, transparent 70%);
  animation-delay: -15s; animation-duration: 30s;
}

@keyframes orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(40px, -60px) scale(1.05); }
  66%       { transform: translate(-30px, 40px) scale(0.95); }
}

/* ── GLASS COMPONENTS ────────────────────────────────────────── */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
}

.glass-card {
  background: var(--glass-bg-light);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.glass-card:hover {
  transform: translateY(-4px);
  border-color: rgba(14, 165, 160, 0.3);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(14,165,160,0.1);
}

.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, transparent 60%);
  pointer-events: none;
  border-radius: inherit;
}

.glass-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  background: rgba(14, 165, 160, 0.12);
  border: 1px solid rgba(14, 165, 160, 0.25);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--emerald-bright);
  backdrop-filter: var(--glass-blur-sm);
}

.glass-nav {
  background: rgba(5, 12, 20, 0.7);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border-bottom: 1px solid var(--glass-border);
}

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-full);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-sm { padding: 0.5rem 1.1rem; font-size: 0.82rem; }

.btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-bright) 100%);
  color: #0a0c0e;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(201, 152, 58, 0.3);
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(232, 184, 75, 0.4);
  color: #0a0c0e;
}

.btn-glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  backdrop-filter: var(--glass-blur-sm);
}
.btn-glass:hover {
  background: rgba(14, 165, 160, 0.15);
  border-color: var(--emerald);
  color: var(--text-primary);
}

.btn-ghost-outline {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
}
.btn-ghost-outline:hover {
  border-color: var(--emerald-dim);
  color: var(--emerald-bright);
}

/* ── NAVIGATION ──────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
}

.nav-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0.85rem 2rem;
}

.site-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.nav-left-group {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.nav-right-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.site-logo { height: 36px; width: auto; }

.site-logo-text {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.bismillah-glyph {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--gold);
  line-height: 1;
  filter: drop-shadow(0 0 10px rgba(201,152,58,0.5));
  transition: filter 0.3s;
}
.site-logo-wrap:hover .bismillah-glyph {
  filter: drop-shadow(0 0 16px rgba(201,152,58,0.75));
}

.bismillah-glyph.large { font-size: 2.4rem; }

.logo-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

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

.site-nav .nav-ul { display: flex; gap: 0.25rem; }

.site-nav a {
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--text-primary);
  background: rgba(14, 165, 160, 0.1);
}

.nav-actions { display: flex; align-items: center; gap: 0.6rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all var(--transition);
}

.badge-dot {
  width: 7px; height: 7px;
  background: var(--emerald-bright);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

/* ── MAIN / SITE MAIN ────────────────────────────────────────── */
.site-main { position: relative; z-index: 1; padding-top: 72px; }

.section-inner,
.hero-inner { max-width: 1300px; margin: 0 auto; padding: 0 2rem; }

/* ── HERO SECTION ────────────────────────────────────────────── */
.hero-section {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: var(--space-xl) 0;
  overflow: hidden;
}

.hero-inner {
  text-align: center;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  animation: hero-reveal 1s var(--ease-out) both;
}

@keyframes hero-reveal {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.title-line-1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 5rem);
  color: var(--gold);
  filter: drop-shadow(0 0 20px rgba(201, 152, 58, 0.4));
  line-height: 1.2;
  display: block;
}

.title-line-2 {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 300;
  color: var(--text-primary);
  line-height: 1.15;
  display: block;
  letter-spacing: -0.01em;
}

.hero-desc {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.8;
}

.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }

.hero-stats {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  padding: 1.25rem 2.5rem;
}

.stat { text-align: center; }
.stat-num {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--emerald-bright);
  line-height: 1;
}
.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--glass-border);
}

/* Geometric hero visual */
.hero-visual {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.geo-star {
  position: absolute;
  right: 5%;
  top: 15%;
  width: 300px;
  height: 300px;
  opacity: 0.04;
  background: conic-gradient(
    from 0deg,
    var(--emerald) 0deg 30deg,
    transparent 30deg 60deg,
    var(--gold) 60deg 90deg,
    transparent 90deg 120deg,
    var(--emerald) 120deg 150deg,
    transparent 150deg 180deg,
    var(--gold) 180deg 210deg,
    transparent 210deg 240deg,
    var(--emerald) 240deg 270deg,
    transparent 270deg 300deg,
    var(--gold) 300deg 330deg,
    transparent 330deg 360deg
  );
  animation: geo-spin 60s linear infinite;
}

.crescent-moon {
  position: absolute;
  left: 4%;
  bottom: 20%;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: transparent;
  box-shadow: -20px -5px 0 var(--gold);
  opacity: 0.12;
  animation: moon-float 8s ease-in-out infinite;
}

@keyframes geo-spin { to { transform: rotate(360deg); } }
@keyframes moon-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-15px); }
}

/* ── SECTION SHARED ──────────────────────────────────────────── */
.apps-section,
.posts-section,
.newsletter-section {
  padding: var(--space-2xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.section-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--emerald);
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 500px;
}

/* ── APPS GRID ───────────────────────────────────────────────── */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.app-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem 1.75rem;
  text-decoration: none;
  color: var(--text-primary);
  cursor: pointer;
}

.app-card-glow {
  position: absolute;
  top: -60px; left: -60px;
  width: 180px; height: 180px;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0;
  transition: opacity var(--transition);
}
.app-card:hover .app-card-glow { opacity: 0.35; }
.glow-emerald { background: var(--emerald); }
.glow-gold    { background: var(--gold); }
.glow-sapphire{ background: var(--sapphire); }
.glow-rose    { background: var(--rose); }

.app-icon {
  flex-shrink: 0;
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 165, 160, 0.12);
  border: 1px solid rgba(14, 165, 160, 0.2);
  color: var(--emerald-bright);
  transition: all var(--transition);
}
.app-card:hover .app-icon {
  background: rgba(14, 165, 160, 0.2);
  transform: scale(1.05);
}
.app-icon-bukhari { background: rgba(201, 152, 58, 0.12); border-color: rgba(201,152,58,0.2); color: var(--gold-bright); }
.app-icon-prophet { background: rgba(59, 125, 216, 0.12); border-color: rgba(59,125,216,0.2); color: #7db4f0; }
.app-icon-halal   { background: rgba(192, 89, 107, 0.12); border-color: rgba(192,89,107,0.2); color: #e0849a; }

.app-info { flex: 1; min-width: 0; }
.app-name {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
}
.app-desc { font-size: 0.84rem; color: var(--text-secondary); line-height: 1.5; }

.app-arrow {
  flex-shrink: 0;
  font-size: 1.1rem;
  color: var(--text-muted);
  transition: all var(--transition);
}
.app-card:hover .app-arrow { color: var(--emerald); transform: translateX(4px); }

.app-card-more {
  align-items: center;
  justify-content: center;
  cursor: default;
  border-style: dashed;
}
.app-card-more:hover { transform: none; }
.more-text {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.more-icon {
  font-size: 1.8rem;
  color: var(--text-muted);
  line-height: 1;
}
.more-text h3 {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--text-secondary);
}
.more-text p { font-size: 0.82rem; color: var(--text-muted); }

/* ── FEATURED POST ───────────────────────────────────────────── */
.featured-post {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-bottom: 2rem;
  overflow: hidden;
}

.featured-post-image {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
}
.featured-post-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}
.featured-post:hover .featured-post-image img { transform: scale(1.03); }
.featured-post-image .featured-badge {
  position: absolute;
  top: 1rem; left: 1rem;
}
.featured-post-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, transparent 60%, var(--glass-bg));
}

.featured-post-content {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}
.featured-post-title {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2vw, 2rem);
  font-weight: 400;
  line-height: 1.3;
}
.featured-post-title a { color: var(--text-primary); }
.featured-post-title a:hover { color: var(--gold-bright); }
.featured-post-excerpt { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.7; }

/* ── POSTS GRID ──────────────────────────────────────────────── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.posts-grid-sm { grid-template-columns: repeat(3, 1fr); }

.post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.post-card-image-wrap {
  display: block;
  aspect-ratio: 16/9;
  overflow: hidden;
}
.post-card-image {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}
.post-card:hover .post-card-image { transform: scale(1.04); }

.post-card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}

.post-card-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.4;
}
.post-card-title a { color: var(--text-primary); }
.post-card-title a:hover { color: var(--gold-bright); }
.post-card-excerpt { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; flex: 1; }

.post-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--emerald);
  text-decoration: none;
}
.post-tag:hover { color: var(--gold); }

.post-card-meta,
.post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.author-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--glass-border);
}

.author-name { color: var(--text-secondary); font-weight: 500; }
.read-time::before { content: '· '; }

/* ── PAGINATION ──────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: var(--space-lg);
  padding: 1rem 2rem;
}
.page-info { color: var(--text-muted); font-size: 0.88rem; }

/* ── NEWSLETTER ──────────────────────────────────────────────── */
.newsletter-section { padding: var(--space-xl) var(--space-sm); }

.newsletter-inner {
  max-width: 700px;
  margin: 0 auto;
  padding: 3.5rem;
  text-align: center;
  border-color: var(--glass-border-gold);
}

.newsletter-geo {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath fill='none' stroke='rgba(201,152,58,0.05)' stroke-width='0.5' d='M30 5 L50 15 L50 45 L30 55 L10 45 L10 15 Z'/%3E%3C/svg%3E");
  border-radius: inherit;
  pointer-events: none;
}

.newsletter-content { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.newsletter-content h2 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  color: var(--text-primary);
}
.newsletter-content p { color: var(--text-secondary); }

.newsletter-form,
.footer-form { width: 100%; }

.form-row {
  display: flex;
  gap: 0.75rem;
  max-width: 500px;
  margin: 0 auto;
}

input[type="email"] {
  flex: 1;
  padding: 0.75rem 1.25rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition);
}
input[type="email"]::placeholder { color: var(--text-muted); }
input[type="email"]:focus { border-color: var(--emerald); }

.form-note { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.75rem; }

/* ── POST SINGLE PAGE ────────────────────────────────────────── */
.post-wrapper { max-width: 1300px; margin: 0 auto; padding: 2rem; padding-top: calc(72px + 2rem); }

.post-header { margin-bottom: 2rem; position: relative; }
.post-feature-image-wrap {
  width: 100%;
  aspect-ratio: 21/9;
  overflow: hidden;
  border-radius: var(--radius-xl);
  position: relative;
  margin-bottom: -4rem;
}
.post-feature-image { width: 100%; height: 100%; object-fit: cover; }
.post-feature-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(5,12,20,0.8));
}

.post-header-content { padding: 2.5rem 3rem; position: relative; z-index: 1; }
.post-header-inner { max-width: 800px; margin: 0 auto; }
.post-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1.2;
  color: var(--text-primary);
  margin: 0.75rem 0;
  letter-spacing: -0.02em;
}
.post-excerpt { font-size: 1.1rem; color: var(--text-secondary); line-height: 1.7; }

.post-meta-bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}
.author-block { display: flex; align-items: center; gap: 0.75rem; }
.author-block .author-avatar { width: 40px; height: 40px; }
.author-avatar-placeholder {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--emerald-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--text-primary);
}
.author-info .author-name { font-weight: 500; color: var(--text-primary); font-size: 0.9rem; }
.author-bio-short { font-size: 0.78rem; color: var(--text-muted); }
.post-date-group { display: flex; gap: 0.5rem; font-size: 0.82rem; color: var(--text-muted); }

/* Post body layout */
.post-container { max-width: 1300px; margin: 0 auto; padding: 0 2rem; }
.post-content-wrap { display: grid; grid-template-columns: 1fr 250px; gap: 3rem; align-items: start; }

/* Table of Contents */
.toc-panel {
  position: sticky;
  top: calc(72px + 1.5rem);
  padding: 1.5rem;
  order: 2;
}
.toc-title {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--emerald);
  margin-bottom: 1rem;
}
.toc-nav { display: flex; flex-direction: column; gap: 0.35rem; }
.toc-nav a {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  border-left: 2px solid transparent;
  transition: all var(--transition);
  line-height: 1.4;
}
.toc-nav a:hover,
.toc-nav a.active { color: var(--text-primary); border-color: var(--emerald); background: rgba(14,165,160,0.07); }

/* Ghost Content */
.gh-content { order: 1; }
.gh-content h1, .gh-content h2, .gh-content h3, .gh-content h4 {
  font-family: var(--font-serif);
  color: var(--text-primary);
  line-height: 1.3;
  margin: 2rem 0 1rem;
}
.gh-content h2 { font-size: 1.75rem; font-weight: 400; }
.gh-content h3 { font-size: 1.35rem; font-weight: 500; }
.gh-content p { color: var(--text-secondary); line-height: 1.85; margin: 1rem 0; font-size: 1.05rem; }
.gh-content a { color: var(--emerald-bright); border-bottom: 1px solid rgba(14,165,160,0.3); }
.gh-content a:hover { color: var(--gold-bright); border-color: rgba(201,152,58,0.4); }
.gh-content strong { color: var(--text-primary); font-weight: 600; }
.gh-content em { color: var(--gold-bright); font-style: italic; }
.gh-content img { width: 100%; border-radius: var(--radius-md); margin: 1.5rem 0; }
.gh-content blockquote {
  border-left: 3px solid var(--gold);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: rgba(201, 152, 58, 0.06);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-style: italic;
}
.gh-content ul, .gh-content ol { padding-left: 1.5rem; color: var(--text-secondary); }
.gh-content li { margin: 0.4rem 0; }
.gh-content ul li::marker { color: var(--emerald); }
.gh-content code {
  background: rgba(14, 165, 160, 0.12);
  border: 1px solid rgba(14, 165, 160, 0.2);
  border-radius: 5px;
  padding: 0.15em 0.45em;
  font-size: 0.88em;
  color: var(--emerald-bright);
}
.gh-content pre {
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}
.gh-content pre code { background: none; border: none; padding: 0; }

/* Post Footer */
.post-footer { max-width: 1300px; margin: 3rem auto; padding: 0 2rem; }
.post-footer-inner { max-width: 860px; }
.post-footer-tags { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.tags-label { font-size: 0.78rem; color: var(--text-muted); }

.post-share { padding: 1.5rem 2rem; display: flex; align-items: center; gap: 2rem; }
.post-share h4 { font-size: 0.88rem; font-weight: 500; color: var(--text-secondary); }
.share-buttons { display: flex; gap: 0.75rem; }
.share-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.share-btn:hover { background: rgba(14,165,160,0.15); color: var(--emerald-bright); border-color: var(--emerald-dim); }

/* Author Section */
.author-section { max-width: 860px; margin: 2rem auto; }
.author-section-inner { padding: 2rem; display: flex; gap: 1.5rem; align-items: flex-start; }
.author-card-avatar { width: 70px; height: 70px; border-radius: 50%; flex-shrink: 0; border: 2px solid var(--glass-border-gold); }
.author-card-content h3 { font-family: var(--font-serif); font-size: 1.2rem; margin-bottom: 0.5rem; }
.author-card-content p { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 1rem; }

/* Related */
.related-section { max-width: 1300px; margin: 3rem auto; padding: 0 2rem; }
.related-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

/* ── PAGE ────────────────────────────────────────────────────── */
.page-wrapper { max-width: 900px; margin: 0 auto; padding: 2rem; padding-top: calc(72px + 2rem); }
.page-header-inner { padding: 3rem; text-align: center; }
.page-title {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 400;
  color: var(--text-primary);
}
.page-excerpt { color: var(--text-secondary); font-size: 1.1rem; margin-top: 0.75rem; }
.page-content { margin-top: 2rem; }

/* ── FOOTER ──────────────────────────────────────────────────── */
.site-footer {
  margin-top: var(--space-2xl);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  border-bottom: none;
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: var(--space-xl) 2rem var(--space-lg);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 2fr;
  gap: 3rem;
}

.footer-brand { display: flex; flex-direction: column; gap: 0.75rem; }
.footer-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text-primary);
}
.footer-tagline { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; }

.footer-links h4 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--emerald);
  margin-bottom: 1rem;
}
.footer-links ul,
.footer-links nav { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-links a { font-size: 0.9rem; color: var(--text-secondary); }
.footer-links a:hover { color: var(--gold-bright); }

.footer-newsletter h4 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--emerald);
  margin-bottom: 0.5rem;
}
.footer-newsletter p { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 1rem; }
.footer-form { display: flex; gap: 0.6rem; }
.footer-form input { font-size: 0.85rem; padding: 0.6rem 1rem; }

.footer-bottom {
  max-width: 1300px;
  margin: 0 auto;
  padding: 1.25rem 2rem;
  border-top: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-copy, .footer-powered { font-size: 0.82rem; color: var(--text-muted); }
.footer-powered a { color: var(--text-muted); }
.footer-powered a:hover { color: var(--emerald); }
.heart { color: var(--rose); }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .post-content-wrap { grid-template-columns: 1fr; }
  .toc-panel { position: static; order: -1; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .featured-post { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-left-group,
  .nav-actions { display: none; }
  .nav-left-group.open,
  .nav-actions.open { display: flex; }
  .nav-inner { grid-template-columns: 1fr auto 44px; }

  .hero-stats { gap: 1.5rem; padding: 1rem 1.5rem; }
  .hero-cta { flex-direction: column; align-items: center; }

  .apps-grid { grid-template-columns: 1fr; }
  .posts-grid { grid-template-columns: 1fr; }
  .posts-grid-sm { grid-template-columns: 1fr; }

  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }

  .newsletter-inner { padding: 2.5rem 1.5rem; }
  .form-row { flex-direction: column; }

  .post-wrapper { padding: 1rem; padding-top: calc(72px + 1rem); }
  .post-header-content { padding: 1.5rem; }
}

/* ── ANIMATIONS ──────────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .glass-card, .app-card, .post-card {
    animation: card-in 0.5s var(--ease-out) both;
  }

  @keyframes card-in {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

/* Scroll animation utility */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.reveal.visible { opacity: 1; transform: none; }

/* ── ARCHIVE PAGES ───────────────────────────────────────────── */
.archive-wrapper { max-width: 1300px; margin: 0 auto; padding: 2rem; padding-top: calc(72px + 2rem); }
.archive-header { margin-bottom: 3rem; }
.archive-header-inner {
  max-width: 700px;
  margin: 0 auto;
  padding: 3rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.archive-cover { width: 100%; border-radius: var(--radius-md); margin-bottom: 1rem; aspect-ratio: 3/1; object-fit: cover; }
.archive-title { font-family: var(--font-serif); font-size: 2.5rem; font-weight: 400; color: var(--text-primary); }
.archive-desc { color: var(--text-secondary); max-width: 500px; line-height: 1.7; }
.archive-count { font-size: 0.82rem; color: var(--text-muted); letter-spacing: 0.05em; }
.archive-posts { padding-top: 0; }
.author-large-avatar { width: 90px; height: 90px; border-radius: 50%; border: 2px solid var(--glass-border-gold); }
.author-social { display: flex; gap: 0.75rem; margin-top: 0.5rem; }

/* ── GHOST CARD / KOENIG EDITOR CLASSES (required) ──────────── */

/* These classes are required by Ghost for post content cards */
.kg-width-wide {
  position: relative;
  width: 85vw;
  min-width: 100%;
  margin: 1.5rem calc(50% - 42.5vw);
}

.kg-width-full {
  position: relative;
  width: 100vw;
  min-width: 100%;
  margin: 1.5rem calc(50% - 50vw);
}

.kg-image { max-width: 100%; }

.kg-image-card { margin: 1.5rem 0; }
.kg-image-card img { border-radius: var(--radius-md); width: 100%; }
.kg-image-card figcaption {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.5rem;
}

.kg-gallery-card { margin: 1.5rem 0; }
.kg-gallery-container { display: flex; flex-direction: column; gap: 6px; }
.kg-gallery-row { display: flex; gap: 6px; }
.kg-gallery-image { flex: 1; }
.kg-gallery-image img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-sm); }

.kg-video-card { margin: 1.5rem 0; }
.kg-video-card video { width: 100%; border-radius: var(--radius-md); }

.kg-audio-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
}

.kg-embed-card { margin: 1.5rem 0; }
.kg-embed-card iframe { width: 100%; border-radius: var(--radius-md); }

.kg-callout-card {
  display: flex;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: rgba(14, 165, 160, 0.08);
  border: 1px solid rgba(14, 165, 160, 0.2);
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
}
.kg-callout-emoji { font-size: 1.4rem; flex-shrink: 0; }
.kg-callout-text { color: var(--text-secondary); line-height: 1.7; }

.kg-toggle-card {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
  overflow: hidden;
}
.kg-toggle-heading {
  padding: 1rem 1.25rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-primary);
  font-weight: 500;
}
.kg-toggle-content { padding: 0 1.25rem 1rem; color: var(--text-secondary); }

.kg-button-card { margin: 1.5rem 0; text-align: center; }
.kg-button-card a {
  display: inline-flex;
  padding: 0.75rem 1.75rem;
  background: linear-gradient(135deg, var(--emerald-dim), var(--emerald));
  color: var(--text-primary);
  border-radius: var(--radius-full);
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition);
}
.kg-button-card a:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(14,165,160,0.3); }

.kg-divider-card {
  border: none;
  border-top: 1px solid var(--glass-border);
  margin: 2rem 0;
}

.kg-quote-card {
  border-left: 3px solid var(--gold);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: rgba(201, 152, 58, 0.06);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.kg-quote-card blockquote {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--text-secondary);
  border: none;
  padding: 0;
  background: none;
}

.kg-code-card {
  margin: 1.5rem 0;
}
.kg-code-card pre {
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  overflow-x: auto;
}

.kg-header-card {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  margin: 2rem 0;
}
.kg-header-card h2 {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 400;
  color: var(--text-primary);
}

/* ── PAGE FEATURES (required by Ghost) ──────────────────────── */
.page-template .post-content { max-width: 860px; margin: 0 auto; }
.tag-template .site-header-content { border-bottom: 1px solid var(--glass-border); }
.author-template .site-header-content { border-bottom: 1px solid var(--glass-border); }

/* Membership / portal */
.gh-portal-trigger { display: none !important; }

/* Page feature image */
.page-feature-image-wrap {
  width: 100%;
  aspect-ratio: 21/9;
  overflow: hidden;
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
}
.page-feature-image { width: 100%; height: 100%; object-fit: cover; }
