/*
Theme Name: Cupertino Pro
Theme URI: https://azizakca.com.tr
Author: Aziz Akça
Author URI: https://azizakca.com.tr
Description: Modern ve minimalist mühendislik standartlarıyla tasarlanmış; aşırı hafif, tavizsiz tipografi odaklı, modern kod bloklarına ve hızlı arama paletine sahip yazılımcı ve geliştirici teması.
Version: 1.2.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cupertino-pro
Tags: blog, developer, minimal, dark-mode, portfolio, accessibility-ready, custom-menu, featured-images, full-width-template
*/

/* ==========================================================================
   Apple Design Tokens & CSS Custom Properties
   ========================================================================== */
:root {
  /* System Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* Cupertino Light Palette */
  --bg-primary: #FFFFFF;
  --bg-secondary: #F5F5F7;
  --bg-tertiary: #E8E8ED;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-translucent: rgba(255, 255, 255, 0.75);
  --bg-code: #F5F5F7;
  --bg-code-header: #EAEAEF;

  --text-primary: #1D1D1F;
  --text-secondary: #6E6E73;
  --text-tertiary: #86868B;
  --text-accent: #0071E3;
  --text-accent-hover: #0077ED;

  --border-color: rgba(0, 0, 0, 0.08);
  --border-color-hover: rgba(0, 0, 0, 0.16);
  --border-focus: #0071E3;

  --badge-bg: rgba(0, 113, 227, 0.08);
  --badge-text: #0071E3;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.08);

  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --nav-height: 60px;
  --container-width: 820px;
  --container-wide: 1040px;

  --transition-fast: 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Mode (Class & OS Preference) */
[data-theme="dark"],
html.dark {
  --bg-primary: #000000;
  --bg-secondary: #161617;
  --bg-tertiary: #242426;
  --bg-card: rgba(26, 26, 28, 0.85);
  --bg-translucent: rgba(0, 0, 0, 0.75);
  --bg-code: #161617;
  --bg-code-header: #212124;

  --text-primary: #F5F5F7;
  --text-secondary: #A1A1A6;
  --text-tertiary: #6E6E73;
  --text-accent: #2997FF;
  --text-accent-hover: #47A7FF;

  --border-color: rgba(255, 255, 255, 0.12);
  --border-color-hover: rgba(255, 255, 255, 0.22);
  --border-focus: #2997FF;

  --badge-bg: rgba(41, 151, 255, 0.15);
  --badge-text: #2997FF;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-primary: #000000;
    --bg-secondary: #161617;
    --bg-tertiary: #242426;
    --bg-card: rgba(26, 26, 28, 0.85);
    --bg-translucent: rgba(0, 0, 0, 0.75);
    --bg-code: #161617;
    --bg-code-header: #212124;

    --text-primary: #F5F5F7;
    --text-secondary: #A1A1A6;
    --text-tertiary: #6E6E73;
    --text-accent: #2997FF;
    --text-accent-hover: #47A7FF;

    --border-color: rgba(255, 255, 255, 0.12);
    --border-color-hover: rgba(255, 255, 255, 0.22);
    --border-focus: #2997FF;

    --badge-bg: rgba(41, 151, 255, 0.15);
    --badge-text: #2997FF;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
  }
}

/* ==========================================================================
   Base Reset
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

a {
  color: var(--text-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--text-accent-hover);
}

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

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* ==========================================================================
   Layout Containers
   ========================================================================== */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-container {
  width: 100%;
  max-width: var(--container-width);
  margin-left: auto;
  margin-right: auto;
  padding: 0 1.5rem;
}

.site-container-wide {
  width: 100%;
  max-width: var(--container-wide);
  margin-left: auto;
  margin-right: auto;
  padding: 0 1.5rem;
}

.site-main {
  flex: 1;
  padding: 3rem 0 5rem;
}

/* ==========================================================================
   Navigation Bar (Frosted Glass / macOS Menu Bar Inspired)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background-color: var(--bg-translucent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-color);
  transition: border-color var(--transition-normal), background-color var(--transition-normal);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--text-primary);
  min-width: 0;
}

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #1d1d1f, #434346);
  color: #fff;
  font-size: 0.85rem;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

[data-theme="dark"] .brand-icon,
html.dark .brand-icon {
  background: linear-gradient(135deg, #2c2c2e, #48484a);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.brand-text-group {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.1rem;
  min-width: 0;
}

.brand-title {
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -0.015em;
  line-height: 1.15;
  color: var(--text-primary);
  transition: color var(--transition-fast);
  white-space: nowrap;
}

.site-brand:hover .brand-title {
  color: var(--text-accent);
}

.brand-subtitle {
  font-size: 0.70rem;
  font-weight: 450;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
  line-height: 1.15;
  white-space: nowrap;
  transition: color var(--transition-fast);
}

.site-brand:hover .brand-subtitle {
  color: var(--text-primary);
}

@media (max-width: 480px) {
  .brand-title {
    font-size: 0.95rem;
  }
  .brand-subtitle {
    font-size: 0.65rem;
    max-width: 175px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 380px) {
  .brand-icon {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }
  .brand-title {
    font-size: 0.88rem;
  }
  .brand-subtitle {
    font-size: 0.60rem;
    max-width: 135px;
  }
}

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

.nav-links {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 1.25rem;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-xs);
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.nav-links a:hover,
.nav-links .current-menu-item a {
  color: var(--text-primary);
  background-color: var(--bg-secondary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

/* Spotlight Search Trigger Button */
.spotlight-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.spotlight-trigger:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-color-hover);
}

.spotlight-trigger kbd {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  padding: 0.1rem 0.35rem;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  box-shadow: 0 1px 1px rgba(0,0,0,0.05);
}

/* Theme Switcher Button */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

/* ==========================================================================
   Developer Bio & "Now" Status Component
   ========================================================================== */
.dev-hero {
  margin-bottom: 3.5rem;
}

.dev-hero-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

/* ==========================================================================
   Cupertino Pro Next-Gen Avatar System (Apple Squircle & Radar Beacon)
   ========================================================================== */
.dev-avatar-wrap,
.author-avatar-wrap {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  perspective: 800px;
}

.avatar-frame-pro {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 6px 16px -2px rgba(0, 0, 0, 0.08),
    inset 0 1px 1px rgba(255, 255, 255, 0.7),
    inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  transition: 
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.3s ease;
  will-change: transform, box-shadow;
}

/* Dark Mode Elevation */
[data-theme="dark"] .avatar-frame-pro {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.45),
    0 10px 24px -4px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* Specific Sizes */
.dev-avatar-frame {
  width: 72px;
  height: 72px;
  border-radius: 20px;
}

.author-avatar-frame {
  width: 72px;
  height: 72px;
  border-radius: 20px;
}

/* Legacy .dev-avatar fallback compatibility */
.dev-avatar {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  object-fit: cover;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

/* Interactive Apple Elevation & Bloom Halo on Hover */
.dev-avatar-wrap:hover .avatar-frame-pro,
.author-avatar-wrap:hover .avatar-frame-pro {
  transform: translateY(-3px) scale(1.025);
  border-color: rgba(0, 113, 227, 0.45);
  box-shadow: 
    0 4px 14px rgba(0, 113, 227, 0.25),
    0 14px 28px -4px rgba(0, 0, 0, 0.12),
    inset 0 1px 1.5px rgba(255, 255, 255, 0.85);
}

[data-theme="dark"] .dev-avatar-wrap:hover .avatar-frame-pro,
[data-theme="dark"] .author-avatar-wrap:hover .avatar-frame-pro {
  border-color: rgba(41, 151, 255, 0.55);
  box-shadow: 
    0 0 22px rgba(41, 151, 255, 0.35),
    0 14px 32px -4px rgba(0, 0, 0, 0.75),
    inset 0 1px 1px rgba(255, 255, 255, 0.25);
}

/* Avatar Image */
.avatar-pro-img,
.dev-avatar-img,
.author-avatar-img,
.avatar-frame-pro img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.dev-avatar-wrap:hover .avatar-pro-img,
.author-avatar-wrap:hover .avatar-pro-img,
.dev-avatar-wrap:hover img,
.author-avatar-wrap:hover img {
  transform: scale(1.05);
}

/* Specular Glass Shine / Apple Light Sweep */
.avatar-glass-shine {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.4) 0%,
    rgba(255, 255, 255, 0.1) 32%,
    rgba(255, 255, 255, 0) 60%
  );
  opacity: 0.65;
  transition: opacity 0.4s ease, transform 0.6s ease;
  z-index: 2;
}

[data-theme="dark"] .avatar-glass-shine {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.22) 0%,
    rgba(255, 255, 255, 0.04) 28%,
    rgba(255, 255, 255, 0) 55%
  );
  opacity: 0.5;
}

.dev-avatar-wrap:hover .avatar-glass-shine,
.author-avatar-wrap:hover .avatar-glass-shine {
  opacity: 0.95;
  transform: scale(1.04);
}

/* Next-Gen Terminal Compiler Fallback (>_) */
.avatar-terminal-ph,
.author-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 35% 30%, #1e293b 0%, #090e17 100%);
  font-family: var(--font-mono);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  user-select: none;
  position: relative;
}

.avatar-terminal-ph::before,
.author-avatar-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 5px 5px;
  opacity: 0.6;
}

.avatar-terminal-ph .ph-bracket {
  color: var(--text-accent, #0071e3);
  text-shadow: 0 0 10px rgba(0, 113, 227, 0.5);
  position: relative;
  z-index: 1;
}

[data-theme="dark"] .avatar-terminal-ph .ph-bracket {
  color: #2997ff;
  text-shadow: 0 0 12px rgba(41, 151, 255, 0.7);
}

.avatar-terminal-ph .ph-cursor {
  color: #34c759;
  text-shadow: 0 0 8px rgba(52, 199, 89, 0.7);
  animation: terminal-cursor-blink 1.05s steps(2, start) infinite;
  position: relative;
  z-index: 1;
}

@keyframes terminal-cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Apple Live Radar Presence Beacon */
.avatar-status-beacon,
.author-status-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  pointer-events: auto;
  cursor: help;
}

.avatar-status-beacon .radar-dot,
.author-status-dot {
  position: relative;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4cd964 0%, #28cd41 100%);
  box-shadow: 0 0 0 2.5px var(--bg-card), 0 1px 3px rgba(0, 0, 0, 0.25);
  z-index: 3;
}

.avatar-status-beacon .radar-dot::after,
.author-status-dot::after {
  content: '';
  position: absolute;
  top: 1.5px;
  left: 2px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
}

.avatar-status-beacon .radar-glow {
  position: absolute;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background-color: rgba(52, 199, 89, 0.45);
  filter: blur(2px);
  animation: radar-beacon-breathe 2.4s ease-in-out infinite;
  z-index: 2;
}

.avatar-status-beacon .radar-ping {
  position: absolute;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1.8px solid #34C759;
  opacity: 0.8;
  animation: radar-beacon-ping 2.4s cubic-bezier(0.16, 1, 0.3, 1) infinite;
  z-index: 1;
}

@keyframes radar-beacon-ping {
  0% {
    transform: scale(0.9);
    opacity: 0.9;
  }
  60% {
    transform: scale(2.4);
    opacity: 0;
  }
  100% {
    transform: scale(2.4);
    opacity: 0;
  }
}

@keyframes radar-beacon-breathe {
  0%, 100% {
    transform: scale(1);
    opacity: 0.4;
  }
  50% {
    transform: scale(1.6);
    opacity: 0.8;
  }
}

.dev-title-area h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  line-height: 1.2;
}

.dev-role {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 0.2rem;
  font-weight: 400;
}

.dev-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #34C759;
  box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.7);
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(52, 199, 89, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(52, 199, 89, 0);
  }
}

.dev-bio-text {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1.5rem;
  max-width: 680px;
}

.dev-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tech-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-xs);
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.tech-tag:hover {
  color: var(--text-accent);
  border-color: var(--text-accent);
}

.dev-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.dev-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-secondary);
}

.dev-links a:hover {
  color: var(--text-accent);
}

/* ==========================================================================
   Featured Projects / Showcase (Xcode App Icon Vibe)
   ========================================================================== */
.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

.section-action {
  font-size: 0.85rem;
  color: var(--text-accent);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 3.5rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  border-radius: var(--radius-md);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  color: var(--text-primary);
  text-decoration: none;
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-color-hover);
  color: var(--text-primary);
}

.project-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.project-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-accent);
}

.project-title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.project-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1rem;
  flex: 1;
}

.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--text-tertiary);
}

.lang-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 0.35rem;
}

.lang-swift { background-color: #F05138; }
.lang-typescript { background-color: #3178C6; }
.lang-rust { background-color: #DEA584; }
.lang-python { background-color: #3572A5; }
.lang-go { background-color: #00ADD8; }
.lang-javascript { background-color: #F7DF1E; }
.lang-php { background-color: #777BB4; }
.lang-docker { background-color: #2496ED; }
.lang-other { background-color: #34C759; }

/* ==========================================================================
   Article List (Engineering Log Style)
   ========================================================================== */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.post-card {
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.5rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  text-decoration: none;
  color: inherit;
}

.post-card:hover {
  border-color: var(--border-color-hover);
  background-color: var(--bg-secondary);
  transform: translateX(4px);
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-bottom: 0.4rem;
  font-family: var(--font-mono);
}

.post-card-date {
  color: var(--text-secondary);
}

.post-reading-time {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.post-card-title {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.post-card:hover .post-card-title {
  color: var(--text-accent);
}

.post-card-excerpt {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 0.75rem;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.post-tag {
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-xs);
  background-color: var(--bg-secondary);
  color: var(--text-tertiary);
  border: 1px solid var(--border-color);
}

/* ==========================================================================
   Single Post & Deep Reading Experience
   ========================================================================== */
.reading-progress-bar {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  height: 2px;
  background-color: var(--text-accent);
  width: 0%;
  z-index: 99;
  transition: width 0.1s linear;
}

/* ==========================================================================
   Cupertino Pro Next-Gen Single Post Template (Engineering Article View)
   ========================================================================== */
.single-article-pro {
  margin-bottom: 4rem;
}

.post-header-pro,
.post-header {
  margin-bottom: 2.75rem;
}

/* 1. Header Top: Breadcrumb & Ref Badge */
.post-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.post-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: var(--text-tertiary);
}

.breadcrumb-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.breadcrumb-link:hover {
  color: var(--text-accent);
}

.breadcrumb-separator {
  color: var(--border-color);
  user-select: none;
}

.breadcrumb-category {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.breadcrumb-category:hover {
  border-color: var(--text-accent);
  color: var(--text-accent);
  background: var(--badge-bg);
}

.category-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-accent);
}

.breadcrumb-current {
  color: var(--text-secondary);
  font-weight: 500;
}

.post-ref-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.2rem 0.65rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs);
  font-size: 0.74rem;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
}

.badge-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34C759;
  box-shadow: 0 0 6px rgba(52, 199, 89, 0.6);
}

/* 2. Impactful SF Pro Display Title */
/* 2. Impactful SF Pro Display Title (Apple WWDC Keynote Optical Typography) */
.post-title-pro,
.post-header h1 {
  font-size: clamp(1.85rem, 3.8vw, 2.75rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.22;
  color: var(--text-primary);
  margin: 0 0 1.25rem;
  text-wrap: balance;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Apple Keynote Optical Metallic / Slate Gradient for Post Title */
@supports (-webkit-background-clip: text) {
  .post-title-pro {
    background: linear-gradient(180deg, #1D1D1F 0%, #3A3A3C 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  [data-theme="dark"] .post-title-pro,
  :root:not([data-theme="light"]) .post-title-pro {
    background: linear-gradient(180deg, #FFFFFF 0%, rgba(245, 245, 247, 0.86) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}

/* 3. Rich Engineering Meta Bar */
.post-meta-pro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.meta-author-chip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.author-chip-avatar-link {
  display: block;
  flex-shrink: 0;
}

.meta-author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  object-fit: cover;
  display: block;
  border: 1px solid var(--border-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.meta-author-avatar:hover {
  transform: scale(1.06);
}

.meta-author-text {
  display: flex;
  flex-direction: column;
}

.author-chip-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  line-height: 1.3;
}

.author-chip-name:hover {
  color: var(--text-accent);
}

.author-chip-role {
  font-size: 0.76rem;
  color: var(--text-tertiary);
}

.meta-items-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.meta-item-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding: 0.25rem 0.65rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
}

.meta-item-pill svg {
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.meta-comments-link {
  text-decoration: none;
  transition: all var(--transition-fast);
}

.meta-comments-link:hover {
  background: var(--badge-bg);
  border-color: var(--text-accent);
  color: var(--text-accent);
}

/* Legacy .post-meta fallback */
.post-header .post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

/* 4. Tags */
.post-tags-pro {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tag-pill-pro {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.tag-pill-pro:hover {
  border-color: var(--text-accent);
  color: var(--text-accent);
  background: var(--bg-primary);
  transform: translateY(-1px);
}

.tag-pill-pro .tag-hash {
  color: var(--text-accent);
  font-weight: 600;
}

/* 5. Apple Engineering Command Strip (Replaces the empty grey box) */
.post-command-bar,
.post-dev-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.75rem 1.15rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin: 1.5rem 0 2rem;
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: border-color var(--transition-fast);
}

[data-theme="dark"] .post-command-bar,
[data-theme="dark"] .post-dev-actions {
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.command-bar-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.command-spec-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-xs);
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-accent);
  letter-spacing: 0.04em;
}

.spec-live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #34c759;
  box-shadow: 0 0 6px rgba(52, 199, 89, 0.75);
  display: inline-block;
  margin-left: 2px;
  animation: specLivePulse 2.2s infinite ease-in-out;
}

@keyframes specLivePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

.command-bar-desc {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.command-bar-tag {
  display: none;
}

.command-actions-group {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.command-btn,
.dev-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.38rem 0.85rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all var(--transition-fast);
}

.command-btn:hover,
.dev-action-btn:hover {
  color: var(--text-accent);
  border-color: var(--border-color-hover);
  background: var(--bg-card);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.command-btn:active,
.dev-action-btn:active {
  transform: scale(0.97);
}

.command-btn.btn-bookmark.is-bookmarked {
  color: #ff9500;
  border-color: rgba(255, 149, 0, 0.35);
  background: rgba(255, 149, 0, 0.08);
}

.command-btn.btn-bookmark.is-bookmarked svg {
  color: #ff9500;
}

.command-btn svg,
.dev-action-btn svg {
  flex-shrink: 0;
}

/* 6. Featured Cover Image Banner */
.post-cover-wrapper {
  margin: 1.75rem 0 2.5rem;
  padding: 0;
}

.post-cover-frame {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 10px 32px -6px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

[data-theme="dark"] .post-cover-frame {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.4),
    0 16px 40px -8px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.post-cover-img {
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: cover;
  display: block;
}

.post-cover-glint {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.05) 30%, transparent 60%);
  opacity: 0.6;
}

.post-cover-caption {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  text-align: center;
  margin-top: 0.75rem;
  font-style: italic;
}

/* 7. Lead Paragraph Styling */
.post-content > p:first-of-type {
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

/* 8. Next-Gen Dual Post Navigation */
.post-navigation-pro,
.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin: 3.5rem 0 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.post-navigation-pro .post-nav-card,
.post-navigation .post-nav-card {
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.4rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.post-navigation-pro .post-nav-card:hover,
.post-navigation .post-nav-card:hover {
  transform: translateY(-2px);
  border-color: var(--text-accent);
  box-shadow: var(--shadow-md);
}

.post-navigation-pro .next-card {
  text-align: right;
  align-items: flex-end;
}

.nav-card-sub,
.post-nav-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-bottom: 0.45rem;
}

.post-nav-card:hover .nav-card-sub,
.post-nav-card:hover .post-nav-label {
  color: var(--text-accent);
}

.nav-card-title,
.post-nav-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
}

.post-nav-card.nav-card-empty {
  visibility: hidden;
  border: none;
  background: transparent;
  pointer-events: none;
}

/* Mobile Responsiveness for Single View */
@media (max-width: 768px) {
  .post-header-pro {
    margin-bottom: 2rem;
  }
  .post-title-pro {
    font-size: 1.85rem;
  }
  .post-meta-pro {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  /* Ultra-Refined iOS 18 Native Command Strip for Mobile */
  .post-command-bar {
    position: relative;
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
    padding: 0.65rem 0.75rem;
    margin: 1rem 0 1.35rem;
    border-radius: 14px;
    background: var(--bg-secondary);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  }

  [data-theme="dark"] .post-command-bar {
    background: rgba(28, 28, 30, 0.75);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }

  .command-bar-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 0.1rem;
    flex-wrap: nowrap;
  }

  .command-spec-pill {
    padding: 0.18rem 0.5rem;
    font-size: 0.67rem;
    border-radius: 6px;
    background: rgba(0, 113, 227, 0.06);
    border-color: rgba(0, 113, 227, 0.18);
    color: var(--text-accent);
  }

  /* Hide wordy multi-line sentence on mobile, show concise single-line tag */
  .command-bar-desc {
    display: none !important;
  }

  .command-bar-tag {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    text-transform: uppercase;
  }

  /* Symmetric 2-Column iOS Control Palette */
  .command-actions-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.42rem;
    width: 100%;
  }

  /* Force all grid direct items and wrappers to full column width */
  .command-actions-group > * {
    width: 100% !important;
    min-width: 0 !important;
  }

  .share-sheet-wrapper,
  .reader-controls-wrapper {
    position: static !important;
    display: flex !important;
    width: 100% !important;
  }

  .share-sheet-wrapper > .command-btn,
  .reader-controls-wrapper > .command-btn,
  .command-actions-group > .command-btn {
    width: 100% !important;
    height: 35px !important;
    min-height: 35px !important;
    max-height: 35px !important;
    padding: 0 0.5rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.4rem !important;
    font-size: 0.72rem !important;
    font-family: var(--font-mono) !important;
    font-weight: 500 !important;
    border-radius: 9px !important;
    background: var(--bg-primary) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    transition: transform 0.12s cubic-bezier(0.25, 1, 0.5, 1), background 0.12s ease, border-color 0.12s ease !important;
  }

  [data-theme="dark"] .command-actions-group > .command-btn,
  [data-theme="dark"] .share-sheet-wrapper > .command-btn,
  [data-theme="dark"] .reader-controls-wrapper > .command-btn {
    background: rgba(44, 44, 46, 0.6) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  }

  .command-btn:active {
    transform: scale(0.965) !important;
    background: var(--bg-secondary) !important;
  }

  .command-btn svg {
    width: 13px !important;
    height: 13px !important;
    flex-shrink: 0 !important;
  }

  .reader-btn-aa {
    font-size: 0.8rem !important;
    margin-right: -1px;
  }

  /* If only 5 buttons present, span bookmark cleanly across 2 columns */
  .command-actions-group > .command-btn:last-child:nth-child(odd) {
    grid-column: span 2 !important;
  }

  /* Full-Width Apple Frosted Sheet for Mobile Popovers */
  .share-sheet-popover,
  .reader-controls-popover {
    position: absolute !important;
    top: calc(100% + 6px) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    border-radius: 14px !important;
    box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.28), 0 2px 10px rgba(0, 0, 0, 0.08) !important;
    z-index: 1050 !important;
  }
  .post-navigation-pro,
  .post-navigation {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .post-navigation-pro .next-card {
    text-align: left;
    align-items: flex-start;
  }
}

.post-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 960px) {
  .post-layout.has-toc {
    grid-template-columns: 1fr 240px;
  }
}

/* Table of Contents */
.toc-wrapper {
  position: sticky;
  top: calc(var(--nav-height) + 2rem);
  height: fit-content;
  padding: 1.25rem;
  border-radius: var(--radius-md);
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
}

.toc-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-bottom: 0.75rem;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.85rem;
}

.toc-list a {
  color: var(--text-secondary);
  display: block;
  padding: 0.15rem 0;
  transition: color var(--transition-fast);
}

.toc-list a:hover,
.toc-list a.active {
  color: var(--text-accent);
  font-weight: 500;
}

/* Post Body Content Typography */
.post-content {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-primary);
}

.post-content p {
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   Apple Developer & Gutenberg Heading System (.wp-block-heading / H2-H6)
   ========================================================================== */
.wp-block-heading,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
  position: relative;
  color: var(--text-primary);
  scroll-margin-top: calc(var(--nav-height, 64px) + 26px) !important;
  word-break: break-word;
  text-wrap: balance;
}

/* H2 - Major Section with Apple Accent Bar & Glass Underline */
.post-content h2,
.post-content .wp-block-heading:is(h2),
h2.wp-block-heading {
  font-size: clamp(1.42rem, 2.5vw, 1.82rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.32;
  margin: 3rem 0 1.25rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--border-subtle);
}

/* Apple Accent Indicator Bar on H2 */
.post-content h2::before,
.post-content .wp-block-heading:is(h2)::before {
  content: '';
  position: absolute;
  left: -1rem;
  top: 0.22em;
  bottom: calc(0.7rem + 0.22em);
  width: 3.5px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--accent-primary, #0071E3) 0%, rgba(0, 113, 227, 0.35) 100%);
  opacity: 0.95;
}

/* H3 - Sub-Section with Micro Contrast */
.post-content h3,
.post-content .wp-block-heading:is(h3),
h3.wp-block-heading {
  font-size: clamp(1.18rem, 1.9vw, 1.38rem);
  font-weight: 600;
  letter-spacing: -0.018em;
  line-height: 1.36;
  margin: 2.25rem 0 0.85rem;
}

/* H4 - Technical Sub-Block / Micro API */
.post-content h4,
.post-content .wp-block-heading:is(h4),
h4.wp-block-heading {
  font-size: 1.06rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.4;
  margin: 1.85rem 0 0.65rem;
  color: var(--text-secondary);
}

/* H5, H6 - Micro Spec Markers */
.post-content h5,
.post-content .wp-block-heading:is(h5),
.post-content h6,
.post-content .wp-block-heading:is(h6) {
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 1.5rem 0 0.5rem;
  color: var(--text-tertiary);
}

/* Inline Code inside Headings (Xcode Inline API Pill) */
.post-content h2 code,
.post-content h3 code,
.post-content h4 code,
.wp-block-heading code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  font-weight: 550;
  padding: 0.12em 0.42em;
  border-radius: 6px;
  background: rgba(0, 113, 227, 0.08);
  color: var(--accent-primary, #0071E3);
  border: 1px solid rgba(0, 113, 227, 0.18);
  vertical-align: 0.04em;
  letter-spacing: -0.01em;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

[data-theme="dark"] .post-content h2 code,
[data-theme="dark"] .post-content h3 code,
[data-theme="dark"] .post-content h4 code,
[data-theme="dark"] .wp-block-heading code,
:root:not([data-theme="light"]) .post-content h2 code,
:root:not([data-theme="light"]) .post-content h3 code,
:root:not([data-theme="light"]) .post-content h4 code,
:root:not([data-theme="light"]) .wp-block-heading code {
  background: rgba(41, 151, 255, 0.14);
  color: #64D2FF;
  border-color: rgba(41, 151, 255, 0.28);
}

/* Gutenberg Core Alignment Classes */
.wp-block-heading.has-text-align-center {
  text-align: center;
  border-bottom: none;
}
.wp-block-heading.has-text-align-center::before {
  display: none !important;
}
.wp-block-heading.has-text-align-right {
  text-align: right;
}
.wp-block-heading.has-text-align-right::before {
  left: auto !important;
  right: -1rem !important;
}

.post-content ul,
.post-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.post-content li {
  margin-bottom: 0.4rem;
}

.post-content blockquote {
  margin: 1.75rem 0;
  padding: 0.75rem 1.25rem;
  border-left: 3px solid var(--text-accent);
  background-color: var(--bg-secondary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary);
  font-style: normal;
}

.post-content code:not(pre code) {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 0.15em 0.4em;
  border-radius: var(--radius-xs);
  background-color: var(--bg-secondary);
  color: var(--text-accent);
  border: 1px solid var(--border-color);
}

/* ==========================================================================
   macOS / Xcode Styled Code Blocks
   ========================================================================== */
.code-block-wrapper {
  margin: 2rem 0;
  border-radius: var(--radius-md);
  background-color: var(--bg-code);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  background-color: var(--bg-code-header);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--text-tertiary);
}

.code-mac-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mac-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.mac-dot-close { background-color: #FF5F56; }
.mac-dot-min { background-color: #FFBD2E; }
.mac-dot-max { background-color: #27C93F; }

.code-lang-pill {
  font-weight: 500;
  color: var(--text-secondary);
}

.copy-code-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.5rem;
  background-color: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  font-size: 0.72rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.copy-code-btn:hover {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  border-color: var(--border-color-hover);
}

.post-content pre {
  margin: 0;
  padding: 1.25rem 1rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.6;
  tab-size: 2;
  background-color: transparent;
}

/* ==========================================================================
   Author Bio Card & Post Navigation
   ========================================================================== */
.post-author-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 3.5rem;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
}

.post-author-box img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
}

.post-author-meta h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.post-author-meta p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin: 0;
}

.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

.post-nav-card {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  text-decoration: none;
}

.post-nav-card:hover {
  border-color: var(--text-accent);
}

.post-nav-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-bottom: 0.25rem;
}

.post-nav-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-color);
  padding: 2.5rem 0;
  background-color: var(--bg-secondary);
  font-size: 0.85rem;
  color: var(--text-tertiary);
  margin-top: auto;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.footer-hint kbd {
  padding: 0.1rem 0.3rem;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
}

.footer-links a {
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--text-primary);
}

/* ==========================================================================
   Spotlight / Command Palette (Cmd+K) - Ultra Minimalist & Snake Border Beam
   High-Tech Cupertino & Raycast Engineering Standard
   ========================================================================== */
.spotlight-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 14vh;
  padding-left: 1rem;
  padding-right: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.22s ease;
}

[data-theme="dark"] .spotlight-modal,
html.dark .spotlight-modal {
  background-color: rgba(0, 0, 0, 0.65);
}

.spotlight-modal.is-open {
  opacity: 1;
  visibility: visible;
}

/* Outer frame with dynamic snake beam padding */
.spotlight-dialog {
  position: relative;
  width: 100%;
  max-width: 600px;
  padding: 1.5px; /* The snake beam perimeter channel */
  border-radius: 20px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.08); /* Crisp subtle border track in light mode */
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.22), 0 0 35px -8px rgba(0, 113, 227, 0.18);
  transform: scale(0.96) translateY(-12px);
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] .spotlight-dialog,
html.dark .spotlight-dialog {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.65), 0 0 40px -8px rgba(10, 132, 255, 0.28);
}

.spotlight-modal.is-open .spotlight-dialog {
  transform: scale(1) translateY(0);
}

/* Snake Border Beam Animation (Rotates continuously around modal perimeter) */

/* Light Mode: High-contrast rich Apple Blue & Cyan Snake (Sharp & vivid against white) */
.spotlight-border-beam {
  position: absolute;
  inset: -150%;
  background: conic-gradient(
    from 0deg at 50% 50%,
    transparent 0deg,
    transparent 260deg,
    rgba(0, 113, 227, 0.1) 285deg,
    rgba(0, 150, 255, 0.5) 315deg,
    #0091FF 335deg,
    #0071E3 350deg,
    #004DB3 358deg,
    #002D6E 360deg
  );
  animation: spotlight-snake-spin 3.5s linear infinite;
  pointer-events: none;
  z-index: 0;
}

/* Dark Mode: Electric Neon Cyan, Azure & White Snake */
[data-theme="dark"] .spotlight-border-beam,
html.dark .spotlight-border-beam {
  background: conic-gradient(
    from 0deg at 50% 50%,
    transparent 0deg,
    transparent 250deg,
    rgba(10, 132, 255, 0.15) 280deg,
    rgba(100, 210, 255, 0.7) 320deg,
    #0A84FF 345deg,
    #64D2FF 356deg,
    #FFFFFF 360deg
  );
}

@keyframes spotlight-snake-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Inner content: 100% OPAQUE to prevent the rotating gradient from bleeding inside */
.spotlight-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  border-radius: 18.5px;
  background-color: #FFFFFF; /* Pure crisp white in daytime mode */
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

[data-theme="dark"] .spotlight-inner,
html.dark .spotlight-inner {
  background-color: #1C1C1E; /* Crisp Apple dark surface in dark mode */
}

/* Input Area */
.spotlight-input-wrapper {
  display: flex;
  align-items: center;
  padding: 0.95rem 1.25rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  gap: 0.85rem;
  background: #FFFFFF;
}

[data-theme="dark"] .spotlight-input-wrapper,
html.dark .spotlight-input-wrapper {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #1C1C1E;
}

.spotlight-search-icon {
  width: 18px;
  height: 18px;
  color: #0071E3;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

[data-theme="dark"] .spotlight-search-icon,
html.dark .spotlight-search-icon {
  color: #2997FF;
}

.spotlight-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-sans);
  font-size: 1.02rem;
  font-weight: 450;
  color: #1D1D1F;
  letter-spacing: -0.012em;
}

[data-theme="dark"] .spotlight-input,
html.dark .spotlight-input {
  color: #F5F5F7;
}

.spotlight-input::placeholder {
  color: #86868B;
  font-weight: 400;
}

[data-theme="dark"] .spotlight-input::placeholder,
html.dark .spotlight-input::placeholder {
  color: #6E6E73;
}

.spotlight-kbd-esc {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.18rem 0.45rem;
  border-radius: 6px;
  background-color: #F5F5F7;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #6E6E73;
  letter-spacing: 0.04em;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .spotlight-kbd-esc,
html.dark .spotlight-kbd-esc {
  background-color: #2C2C2E;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #A1A1A6;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Minimalist Tag Filter Bar */
.spotlight-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.25rem;
  background-color: #FAFAFC;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

[data-theme="dark"] .spotlight-filter-bar,
html.dark .spotlight-filter-bar {
  background-color: #161618;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.spotlight-filter-bar::-webkit-scrollbar {
  display: none;
}

.spotlight-filter-chip {
  display: inline-flex;
  align-items: center;
  height: 25px;
  padding: 0 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #555559;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-tap-highlight-color: transparent;
}

[data-theme="dark"] .spotlight-filter-chip,
html.dark .spotlight-filter-chip {
  background: #242426;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #A1A1A6;
}

.spotlight-filter-chip:hover {
  background: #F0F0F3;
  color: #1D1D1F;
  border-color: rgba(0, 0, 0, 0.18);
  transform: translateY(-0.5px);
}

[data-theme="dark"] .spotlight-filter-chip:hover,
html.dark .spotlight-filter-chip:hover {
  background: #2C2C2E;
  color: #F5F5F7;
  border-color: rgba(255, 255, 255, 0.2);
}

.spotlight-filter-chip.is-active {
  background: #0071E3;
  color: #FFFFFF;
  border-color: #0071E3;
  box-shadow: 0 2px 8px rgba(0, 113, 227, 0.3);
  font-weight: 600;
}

[data-theme="dark"] .spotlight-filter-chip.is-active,
html.dark .spotlight-filter-chip.is-active {
  background: #0A84FF;
  color: #FFFFFF;
  border-color: #0A84FF;
  box-shadow: 0 0 12px rgba(10, 132, 255, 0.4);
}

/* Results List with Custom Thin Scrollbar */
.spotlight-results {
  max-height: 380px;
  overflow-y: auto;
  padding: 0.45rem 0.55rem;
  list-style: none;
  margin: 0;
  background: #FFFFFF;
  scrollbar-width: thin;
  scrollbar-color: rgba(140, 140, 145, 0.3) transparent;
}

[data-theme="dark"] .spotlight-results,
html.dark .spotlight-results {
  background: #1C1C1E;
}

.spotlight-results::-webkit-scrollbar {
  width: 5px;
}

.spotlight-results::-webkit-scrollbar-track {
  background: transparent;
}

.spotlight-results::-webkit-scrollbar-thumb {
  background: rgba(140, 140, 145, 0.3);
  border-radius: 10px;
}

.spotlight-results::-webkit-scrollbar-thumb:hover {
  background: rgba(140, 140, 145, 0.5);
}

[data-theme="dark"] .spotlight-results::-webkit-scrollbar-thumb,
html.dark .spotlight-results::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .spotlight-results::-webkit-scrollbar-thumb:hover,
html.dark .spotlight-results::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
}

.spotlight-group-title {
  font-size: 0.67rem;
  font-weight: 600;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #86868B;
  padding: 0.65rem 0.75rem 0.25rem;
}

[data-theme="dark"] .spotlight-group-title,
html.dark .spotlight-group-title {
  color: #6E6E73;
}

.spotlight-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.75rem;
  border-radius: 9px;
  cursor: pointer;
  text-decoration: none;
  color: #1D1D1F;
  font-family: var(--font-sans);
  font-size: 0.89rem;
  transition: all 0.12s ease;
  margin-bottom: 2px;
}

[data-theme="dark"] .spotlight-item,
html.dark .spotlight-item {
  color: #F5F5F7;
}

.spotlight-item:hover,
.spotlight-item.is-selected {
  background-color: rgba(0, 113, 227, 0.08);
  color: #0071E3;
  transform: translateX(2px);
}

[data-theme="dark"] .spotlight-item:hover,
[data-theme="dark"] .spotlight-item.is-selected,
html.dark .spotlight-item:hover,
html.dark .spotlight-item.is-selected {
  background-color: rgba(10, 132, 255, 0.15);
  color: #2997FF;
}

.spotlight-item-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.spotlight-item-icon {
  width: 16px;
  height: 16px;
  color: #86868B;
  flex-shrink: 0;
  transition: color 0.12s ease;
}

[data-theme="dark"] .spotlight-item-icon,
html.dark .spotlight-item-icon {
  color: #8E8E93;
}

.spotlight-item.is-selected .spotlight-item-icon {
  color: #0071E3;
}

[data-theme="dark"] .spotlight-item.is-selected .spotlight-item-icon,
html.dark .spotlight-item.is-selected .spotlight-item-icon {
  color: #2997FF;
}

.spotlight-item-title {
  font-size: 0.89rem;
  font-weight: 450;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: inherit;
}

.spotlight-item-badge {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  font-weight: 500;
  padding: 0.12rem 0.45rem;
  border-radius: 6px;
  background-color: #F5F5F7;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #6E6E73;
  flex-shrink: 0;
  margin-left: 0.5rem;
}

[data-theme="dark"] .spotlight-item-badge,
html.dark .spotlight-item-badge {
  background-color: #242426;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #8E8E93;
}

.spotlight-empty {
  padding: 2.5rem 1rem;
  text-align: center;
  color: #86868B;
  font-size: 0.88rem;
}

[data-theme="dark"] .spotlight-empty,
html.dark .spotlight-empty {
  color: #6E6E73;
}

/* Minimalist Footer */
.spotlight-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.25rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  background-color: #FAFAFC;
  font-size: 0.74rem;
  color: #86868B;
}

[data-theme="dark"] .spotlight-footer,
html.dark .spotlight-footer {
  background-color: #161618;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #6E6E73;
}

.spotlight-hints {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.spotlight-hints span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.spotlight-hints kbd {
  padding: 0.12rem 0.35rem;
  background-color: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 4px;
  font-size: 0.68rem;
  font-family: var(--font-mono);
  color: #333336;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .spotlight-hints kbd,
html.dark .spotlight-hints kbd {
  background-color: #242426;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #F5F5F7;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.spotlight-tech-brand {
  font-family: var(--font-mono);
  font-size: 0.70rem;
  color: #86868B;
  letter-spacing: -0.01em;
}

[data-theme="dark"] .spotlight-tech-brand,
html.dark .spotlight-tech-brand {
  color: #6E6E73;
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
  .spotlight-modal {
    padding-top: 5vh;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .spotlight-dialog {
    max-width: 100%;
    border-radius: 18px;
  }

  .spotlight-inner {
    border-radius: 16.5px;
  }

  .spotlight-results {
    max-height: 52vh;
  }

  .spotlight-footer {
    padding: 0.5rem 0.85rem;
    font-size: 0.70rem;
  }

  .spotlight-tech-brand {
    display: none;
  }
}

/* Responsive Breakpoints */
@media (max-width: 640px) {
  .site-header .nav-links {
    display: none;
  }
  
  .post-header h1 {
    font-size: 1.85rem;
  }
  
  .post-navigation {
    grid-template-columns: 1fr;
  }
  
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   Mobile & Tablet Floating Bottom Tab Bar (Fixed Dock)
   ========================================================================== */
.mobile-tab-bar {
  display: none; /* Desktopta gizli */
}

@media (max-width: 960px) {
  /* Alttaki kompakt tab bar için optimize edilmiş gövde alt boşluğu */
  body {
    padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .mobile-tab-bar {
    display: flex;
    position: fixed;
    bottom: max(0.6rem, env(safe-area-inset-bottom, 0.45rem));
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 1.5rem);
    max-width: 420px;
    height: 50px;
    background-color: var(--bg-translucent);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07), 0 1px 4px rgba(0, 0, 0, 0.03);
    z-index: 998;
    align-items: center;
    justify-content: space-around;
    padding: 0 0.4rem;
    transition: background-color var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
  }

  [data-theme="dark"] .mobile-tab-bar,
  html.dark .mobile-tab-bar {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08);
  }

  .tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.2rem 0.35rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    transition: color var(--transition-fast), transform var(--transition-fast);
    flex: 1;
    max-width: 72px;
    -webkit-tap-highlight-color: transparent;
  }

  .tab-item:hover,
  .tab-item:active,
  .tab-item.is-active {
    color: var(--text-accent);
  }

  .tab-item.is-active {
    font-weight: 600;
  }

  .tab-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    transition: transform var(--transition-fast);
  }

  .tab-icon svg {
    width: 19px;
    height: 19px;
  }

  .tab-item:active .tab-icon {
    transform: scale(0.90);
  }

  .tab-label {
    line-height: 1;
    font-size: 0.62rem;
  }
}

/* ==========================================================================
   Advanced Author Box Component (Pro Developer & Apple Minimalist Style)
   ========================================================================== */
.author-card-pro {
  margin: 3.5rem 0 2rem;
  padding: 1.75rem 2rem;
  background-color: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.author-card-pro:hover {
  border-color: var(--border-color-hover);
  box-shadow: 0 8px 30px -6px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.03);
}

.author-card-inner {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

/* (Author Squircle Avatar Frame & Live Status Dot are unified in the Cupertino Pro Avatar System above) */

.author-details {
  flex: 1;
  min-width: 0;
}

.author-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.45rem;
  flex-wrap: nowrap;
}

.author-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 0;
}

.author-name {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  line-height: 1.2;
}

.author-name a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.author-name a:hover {
  color: var(--text-accent);
}

.author-badge-verified {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--text-accent);
  color: #fff;
  flex-shrink: 0;
}

.author-badge-verified svg {
  width: 9px;
  height: 9px;
}

.author-role-sub {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.author-role-tag {
  font-size: 0.84rem;
  color: var(--text-secondary);
  font-weight: 500;
  line-height: 1.4;
}

.author-location {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.76rem;
  font-family: var(--font-mono);
  color: var(--text-tertiary);
  padding: 0.22rem 0.6rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  flex-shrink: 0;
  white-space: nowrap;
  align-self: flex-start;
}

.author-location svg {
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.author-bio-text {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0.75rem 0 1.2rem;
}

/* Unified Developer Toolbar */
.author-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border-color);
}

.author-meta-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.author-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 28px;
  padding: 0 0.65rem;
  border-radius: var(--radius-full);
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  font-size: 0.76rem;
  color: var(--text-secondary);
  line-height: 1;
}

.author-chip svg {
  flex-shrink: 0;
  color: var(--text-tertiary);
}

.author-chip strong {
  color: var(--text-primary);
  font-weight: 600;
}

.author-chip-link {
  color: var(--text-accent);
  background-color: rgba(0, 113, 227, 0.05);
  border-color: rgba(0, 113, 227, 0.2);
  text-decoration: none;
  font-weight: 500;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.author-chip-link svg {
  color: var(--text-accent);
  transition: transform var(--transition-fast);
}

.author-chip-link:hover {
  background-color: rgba(0, 113, 227, 0.12);
  border-color: var(--text-accent);
  transform: translateY(-1px);
}

.author-chip-link:hover svg {
  transform: translateX(2px);
}

.author-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.author-social-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 28px;
  padding: 0 0.65rem;
  border-radius: var(--radius-full);
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 500;
  text-decoration: none;
  line-height: 1;
  transition: all var(--transition-fast);
}

.author-social-btn svg {
  flex-shrink: 0;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.author-social-btn:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-color-hover);
  transform: translateY(-1px);
}

.author-social-btn:hover svg {
  color: var(--text-primary);
}

/* ==========================================================================
   Ultra Mobile Optimization for Author Box Component
   ========================================================================== */
@media (max-width: 640px) {
  .author-card-pro {
    margin: 2.25rem 0 1.5rem;
    padding: 1.25rem 1.15rem;
    border-radius: 20px;
    box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  }

  .author-card-inner {
    display: grid;
    grid-template-columns: 56px 1fr;
    grid-template-areas:
      "avatar heading"
      "bio    bio"
      "toolbar toolbar";
    column-gap: 0.85rem;
    row-gap: 0;
    align-items: center;
  }

  .author-details {
    display: contents;
  }

  /* Compact 58px Apple Squircle Avatar */
  .author-avatar-wrap,
  .dev-avatar-wrap {
    grid-area: avatar;
    align-self: center;
  }

  .author-avatar-frame,
  .dev-avatar-frame,
  .avatar-frame-pro {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    box-shadow: 0 2px 8px -1px rgba(0, 0, 0, 0.06);
  }

  .author-avatar-img,
  .dev-avatar-img,
  .avatar-pro-img,
  .author-avatar-frame img {
    border-radius: 15px;
  }

  .author-avatar-placeholder,
  .avatar-terminal-ph {
    font-size: 1.15rem;
  }

  .author-status-dot,
  .avatar-status-beacon {
    width: 14px;
    height: 14px;
    bottom: -1px;
    right: -1px;
  }
  .avatar-status-beacon .radar-dot,
  .author-status-dot {
    width: 10px;
    height: 10px;
  }

  /* Identity Header (Side-by-side with Avatar) */
  .author-heading-row {
    grid-area: heading;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.15rem;
    margin-bottom: 0;
    width: 100%;
  }

  .author-title-group {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    width: 100%;
  }

  .author-name {
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.25;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding-right: 80px; /* Safe space for top-right location badge (Position 2) */
  }

  .author-badge-verified {
    width: 14px;
    height: 14px;
  }

  .author-badge-verified svg {
    width: 8px;
    height: 8px;
  }

  .author-role-sub {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
  }

  .author-role-tag {
    font-size: 0.78rem;
    line-height: 1.35;
    color: var(--text-secondary);
  }

  /* Location Badge - Position 2: Pinned to Top-Right of Card */
  .author-location {
    position: absolute;
    top: 1.25rem;
    right: 1.15rem;
    font-size: 0.68rem;
    padding: 0.18rem 0.52rem;
    border-radius: var(--radius-full);
    margin: 0;
    flex-shrink: 0;
    white-space: nowrap;
    z-index: 2;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
  }

  .author-location svg {
    width: 10px;
    height: 10px;
  }

  /* Full Width Serene Bio */
  .author-bio-text {
    grid-area: bio;
    font-size: 0.86rem;
    line-height: 1.6;
    margin: 0.85rem 0 1rem;
    color: var(--text-secondary);
  }

  /* Ultra Mobile Toolbar */
  .author-toolbar {
    grid-area: toolbar;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border-color);
    width: 100%;
  }

  /* Stats row with smooth alignment */
  .author-meta-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
  }

  .author-chip {
    height: 28px;
    padding: 0 0.55rem;
    font-size: 0.72rem;
    gap: 0.35rem;
  }

  .author-chip svg {
    width: 11px;
    height: 11px;
  }

  .author-chip-link {
    margin-left: auto;
    font-weight: 600;
  }

  /* Symmetrical Native iOS Dock / Segmented Bar for Actions */
  .author-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
    gap: 0.35rem;
    width: 100%;
  }

  .author-social-btn {
    height: 34px;
    padding: 0 0.4rem;
    border-radius: 9px;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 500;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
  }

  .author-social-btn svg {
    width: 11px;
    height: 11px;
  }

  /* Instant Haptic / Visual Touch Feedback */
  .author-social-btn:active,
  .author-chip-link:active {
    transform: scale(0.96);
    background-color: var(--bg-tertiary);
    transition: transform 0.08s ease;
  }
}

/* Micro screens (iPhone SE, Galaxy Fold 320-375px) */
@media (max-width: 380px) {
  .author-card-pro {
    padding: 1rem 0.85rem;
  }

  .author-card-inner {
    grid-template-columns: 50px 1fr;
    column-gap: 0.75rem;
  }

  .author-avatar-frame,
  .dev-avatar-frame,
  .avatar-frame-pro {
    width: 50px;
    height: 50px;
    border-radius: 14px;
  }

  .author-avatar-img,
  .dev-avatar-img,
  .avatar-pro-img,
  .author-avatar-frame img {
    border-radius: 13px;
  }

  .author-name {
    font-size: 1.05rem;
    padding-right: 70px;
  }

  .author-role-tag {
    font-size: 0.74rem;
  }

  .author-location {
    top: 1rem;
    right: 0.85rem;
    font-size: 0.64rem;
    padding: 0.12rem 0.45rem;
  }

  .author-chip-link {
    margin-left: 0;
  }

  .author-actions {
    grid-template-columns: repeat(auto-fit, minmax(58px, 1fr));
    gap: 0.25rem;
  }

  .author-social-btn {
    height: 32px;
    font-size: 0.68rem;
    gap: 0.3rem;
  }
}

/* Homepage Hero Additions */
.dev-name-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dev-role-sub {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.2rem;
  flex-wrap: wrap;
}

.dev-location-pill {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

/* ==========================================================================
   PRO MODULE 1: Git Diff & Multi-Language Code Tabs
   ========================================================================== */
.code-diff {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.6;
  margin: 1.5rem 0;
}

.diff-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.78rem;
  color: var(--text-tertiary);
}

.diff-line {
  display: flex;
  padding: 0.15rem 1rem;
  white-space: pre;
}

.diff-line.diff-add {
  background-color: rgba(52, 199, 89, 0.12);
  color: #248A3D;
}

[data-theme="dark"] .diff-line.diff-add {
  background-color: rgba(52, 199, 89, 0.2);
  color: #34C759;
}

.diff-line.diff-del {
  background-color: rgba(255, 59, 48, 0.12);
  color: #D70015;
}

[data-theme="dark"] .diff-line.diff-del {
  background-color: rgba(255, 59, 48, 0.2);
  color: #FF453A;
}

.diff-line.diff-info {
  color: var(--text-tertiary);
  background-color: var(--bg-secondary);
}

.diff-sign {
  width: 20px;
  flex-shrink: 0;
  user-select: none;
  font-weight: 600;
}

.diff-content {
  flex: 1;
}

/* Multi-Language Code Tabs */
.code-tabs {
  margin: 1.75rem 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.code-tabs-nav {
  display: flex;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 0.35rem 0.5rem 0;
  gap: 0.25rem;
  overflow-x: auto;
}

.code-tab-btn {
  padding: 0.4rem 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--radius-xs) var(--radius-xs) 0 0;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.code-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(0,0,0,0.03);
}

.code-tab-btn.is-active {
  color: var(--text-accent);
  background: var(--bg-card);
  font-weight: 600;
  border-bottom: 2px solid var(--text-accent);
}

.code-tab-panel {
  display: none;
}

.code-tab-panel.is-active {
  display: block;
}

.code-tab-panel pre {
  margin: 0;
  border: none;
  border-radius: 0;
}

/* ==========================================================================
   PRO MODULE 5: Resume / CV Template Styles
   ========================================================================== */
.resume-wrapper {
  max-width: 840px;
  margin: 3rem auto 5rem;
  padding: 0 1.5rem;
}

.resume-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.resume-intro h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
  letter-spacing: -0.02em;
}

.resume-role {
  font-size: 1.15rem;
  color: var(--text-accent);
  font-weight: 500;
  margin-bottom: 0.8rem;
}

.resume-contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.resume-actions {
  display: flex;
  gap: 0.75rem;
}

.btn-resume-print {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  background-color: var(--text-accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

.btn-resume-print:hover {
  opacity: 0.9;
}

.resume-section {
  margin-bottom: 3rem;
}

.resume-section-title {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.resume-section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.resume-timeline {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.timeline-item {
  position: relative;
  padding-left: 1.5rem;
  border-left: 2px solid var(--border-color);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-accent);
  border: 2px solid var(--bg-card);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
}

.timeline-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0;
}

.timeline-company {
  color: var(--text-accent);
  font-weight: 500;
}

.timeline-period {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-tertiary);
}

.timeline-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0.5rem 0 0;
}

.timeline-tags {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.6rem;
  flex-wrap: wrap;
}

/* Skills Matrix */
.skills-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.skill-card {
  padding: 1.25rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

.skill-card h4 {
  margin: 0 0 0.8rem;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Print Optimization */
@media print {
  .site-header, .site-footer, .mobile-tab-bar, .btn-resume-print, .reading-progress-bar {
    display: none !important;
  }
  body {
    background: #fff !important;
    color: #000 !important;
  }
  .resume-wrapper {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
}

/* (Developer Command Strip & Action Buttons are unified in the Single Post Template above) */

/* Apple Interactive Heading Anchor Link & Clipboard HUD Trigger */
.heading-anchor {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-left: 0.45rem;
  border-radius: 7px;
  color: var(--text-tertiary);
  text-decoration: none;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              color 0.15s ease,
              background-color 0.15s ease;
  vertical-align: middle;
  cursor: pointer;
}

.heading-anchor svg {
  width: 15px;
  height: 15px;
  transition: transform 0.15s ease;
}

h2:hover .heading-anchor,
h3:hover .heading-anchor,
h4:hover .heading-anchor,
.wp-block-heading:hover .heading-anchor,
.heading-anchor:focus {
  opacity: 0.7;
  transform: translateX(0);
}

.heading-anchor:hover {
  opacity: 1 !important;
  color: var(--accent-primary, #0071E3);
  background-color: var(--fill-tertiary, rgba(0, 0, 0, 0.05));
  transform: translateX(0) scale(1.08);
}

[data-theme="dark"] .heading-anchor:hover,
:root:not([data-theme="light"]) .heading-anchor:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #64D2FF;
}

.heading-anchor:active {
  transform: translateX(0) scale(0.95);
}

/* ==========================================================================
   Syntax Highlighting (Apple Xcode Standard)
   ========================================================================== */
.token-comment {
  color: #8E8E93;
  font-style: italic;
}
.token-string {
  color: #C41A16;
}
.token-keyword {
  color: #9B2393;
  font-weight: 600;
}
.token-type {
  color: #0B8287;
  font-weight: 500;
}
.token-number {
  color: #1C00CF;
}

[data-theme="dark"] .token-comment,
html.dark .token-comment {
  color: #7F8C98;
}
[data-theme="dark"] .token-string,
html.dark .token-string {
  color: #FC6A5D;
}
[data-theme="dark"] .token-keyword,
html.dark .token-keyword {
  color: #FF7AB2;
}
[data-theme="dark"] .token-type,
html.dark .token-type {
  color: #5DD8FF;
}
[data-theme="dark"] .token-number,
html.dark .token-number {
  color: #D0BF69;
}

/* ==========================================================================
   Advanced Developer Comments & Discussion Architecture (Apple HIG)
   ========================================================================== */
.post-comments-area {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border-color);
}

/* Dual Platform Segmented Switcher (Native vs Giscus) */
.comments-platform-switcher {
  display: inline-flex;
  gap: 4px;
  background: var(--bg-secondary);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  margin-bottom: 2.5rem;
}
.platform-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.platform-tab-btn.is-active {
  background: var(--bg-primary);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}
.platform-count-badge {
  background: var(--badge-bg);
  color: var(--badge-text);
  font-size: 0.72rem;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
}

.comments-platform-pane {
  display: none;
}
.comments-platform-pane.is-active {
  display: block;
}

/* Header & Section Title */
.comments-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}
.comments-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.comments-header-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.comments-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.6rem;
  background: var(--badge-bg);
  color: var(--badge-text);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-full);
}
.comments-subtext {
  font-size: 0.82rem;
  color: var(--text-tertiary);
}

/* Comments List & Tree */
.cupertino-comments-tree {
  list-style: none;
  padding: 0;
  margin: 0 0 2.5rem;
}
.cupertino-comment-item {
  list-style: none;
  margin-bottom: 1.25rem;
}
.comment-body-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.comment-body-card:hover {
  border-color: var(--border-color-hover);
  box-shadow: var(--shadow-sm);
}

/* Nested Thread Connector Lines */
.cupertino-comments-tree .children {
  list-style: none;
  margin-left: 1.75rem;
  padding-left: 1rem;
  border-left: 2px solid var(--border-color);
  margin-top: 1rem;
}

/* Author Header & Meta */
.comment-card-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}
.comment-author-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.comment-avatar-img {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  object-fit: cover;
  display: block;
  border: 1px solid var(--border-color);
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 4px 10px -2px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.3s ease;
}
[data-theme="dark"] .comment-avatar-img {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 
    0 2px 6px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.comment-avatar-img:hover {
  transform: translateY(-2px) scale(1.06);
  border-color: var(--text-accent);
  box-shadow: 
    0 4px 14px -2px rgba(0, 113, 227, 0.28),
    0 0 0 1px var(--text-accent);
}
.comment-author-info {
  flex: 1;
}
.comment-author-name-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.comment-author-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}
.comment-author-name a {
  color: inherit;
  text-decoration: none;
}
.comment-author-name a:hover {
  color: var(--text-accent);
}
.comment-author-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 1px 7px;
  background: var(--badge-bg);
  color: var(--badge-text);
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: var(--radius-full);
}
.comment-meta-row {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 2px;
}
.comment-permalink-anchor {
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  text-decoration: none;
}
.comment-permalink-anchor:hover {
  color: var(--text-accent);
}

/* Reply Action Button */
.comment-reply-wrap a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition-fast);
}
.comment-reply-wrap a:hover {
  background: var(--badge-bg);
  color: var(--badge-text);
  border-color: transparent;
}

/* Awaiting Moderation Pill */
.comment-awaiting-moderation {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  background: rgba(255, 149, 0, 0.12);
  color: #FF9500;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

/* Comment Content Typography & Code Blocks */
.comment-card-content {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
}
.comment-card-content p {
  margin-bottom: 0.75rem;
}
.comment-card-content p:last-child {
  margin-bottom: 0;
}
.comment-inline-code,
.comment-card-content code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  padding: 0.15rem 0.4rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs);
  color: var(--text-accent);
}
.comment-code-block,
.comment-card-content pre {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: var(--bg-code);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.1rem;
  overflow-x: auto;
  margin: 0.75rem 0;
}
.comment-card-content blockquote {
  border-left: 3px solid var(--text-accent);
  padding-left: 1rem;
  margin: 0.75rem 0;
  color: var(--text-tertiary);
  font-style: italic;
}

/* Empty State Card */
.comments-empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--bg-secondary);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 2.5rem;
}
.empty-code-badge {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-bottom: 0.6rem;
}
.comments-empty-state h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}
.comments-empty-state p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  max-width: 440px;
  margin: 0 auto;
}

/* Comment Respond Form Card (Universal - works in container and nested as reply) */
.comment-respond {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-top: 2rem;
  position: relative;
  box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.05);
  transition: all var(--transition-fast);
}

[data-theme="dark"] .comment-respond {
  box-shadow: 0 4px 24px -4px rgba(0, 0, 0, 0.4);
}

/* In-Place Nested Reply Form */
.cupertino-comment-item .comment-respond {
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
  background: var(--bg-card);
  border-color: var(--border-color-hover);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  border-radius: var(--radius-md);
}

.comment-reply-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.comment-reply-title small {
  font-size: 0.8rem;
  font-weight: 500;
}
.comment-reply-title #cancel-comment-reply-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: #FF3B30;
  text-decoration: none;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  background: rgba(255, 59, 48, 0.1);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.comment-reply-title #cancel-comment-reply-link:hover {
  background: #FF3B30;
  color: #FFFFFF;
}

/* Logged In Status Banner */
.comment-logged-in-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}
.logged-in-user-pill {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.logged-in-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-color);
}
.logged-in-user-pill strong {
  color: var(--text-primary);
}
.comment-logout-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-tertiary);
  text-decoration: none;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}
.comment-logout-link:hover {
  color: #FF3B30;
  background: rgba(255, 59, 48, 0.08);
}

/* Field Grid */
.comment-fields-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.comment-field-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}
.comment-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.comment-input-wrapper svg {
  position: absolute;
  left: 0.85rem;
  color: var(--text-tertiary);
  pointer-events: none;
}
.comment-input-wrapper input {
  width: 100%;
  padding: 0.65rem 0.85rem 0.65rem 2.4rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.comment-input-wrapper input:focus,
.comment-textarea-group textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

/* Cookies Consent Checkbox */
.comment-cookies-consent {
  margin-bottom: 1.25rem;
}
.apple-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  cursor: pointer;
  user-select: none;
  font-size: 0.82rem;
  color: var(--text-tertiary);
  line-height: 1.5;
}
.apple-checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--text-accent);
  cursor: pointer;
  flex-shrink: 0;
}
.apple-checkbox-label:hover {
  color: var(--text-secondary);
}

/* Comment Textarea & Developer Markdown Toolbar */
.comment-textarea-group {
  margin-bottom: 1.25rem;
}
.comment-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-bottom: none;
  border-top-left-radius: var(--radius-sm);
  border-top-right-radius: var(--radius-sm);
  padding: 0.35rem 0.65rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.comment-tab-nav {
  display: flex;
  gap: 3px;
}
.comment-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.65rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.comment-tab-btn.is-active {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.comment-md-tools {
  display: flex;
  gap: 3px;
}
.comment-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 24px;
  padding: 0 4px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.comment-tool-btn:hover {
  background: var(--bg-primary);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.comment-textarea-group textarea {
  width: 100%;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-bottom-left-radius: var(--radius-sm);
  border-bottom-right-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-primary);
  padding: 0.85rem 1rem;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.6;
  resize: vertical;
  min-height: 120px;
}
.comment-preview-box {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-bottom-left-radius: var(--radius-sm);
  border-bottom-right-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
  min-height: 120px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Submit Row & Keyboard Hint */
.form-submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}
.form-submit-row .form-submit {
  margin: 0;
}
.btn-comment-submit {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.6rem;
  background: var(--text-accent);
  color: #FFFFFF !important;
  border: none;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}
.btn-comment-submit:hover {
  background: var(--text-accent-hover);
  transform: translateY(-1px);
}
.comment-shortcut-hint {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-tertiary);
}
.comment-shortcut-hint kbd {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs);
  box-shadow: 0 1px 0 var(--border-color);
  font-size: 0.72rem;
  color: var(--text-secondary);
}

/* Comments Pagination */
.comments-pagination {
  margin: 2.5rem 0;
  text-align: center;
}
.comments-pagination .nav-links {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-secondary);
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
}
.comments-pagination a,
.comments-pagination .current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}
.comments-pagination a:hover {
  background: var(--bg-primary);
  color: var(--text-primary);
}
.comments-pagination .current {
  background: var(--text-accent);
  color: #FFFFFF !important;
  font-weight: 600;
}

/* Comments Closed Notice */
.comments-closed-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-secondary);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-tertiary);
  font-size: 0.88rem;
  margin-top: 2rem;
  text-align: center;
}

/* Comment Avatar Fallback */
.comment-avatar-fallback {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: radial-gradient(circle at 35% 30%, #1e293b 0%, #0f172a 100%);
  color: var(--text-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  border: 1px solid var(--border-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Active Highlight for Comment Anchors (#comment-123) */
.comment-body-card.is-highlighted {
  animation: commentAnchorGlow 2.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes commentAnchorGlow {
  0% {
    border-color: var(--text-accent);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.35);
  }
  70% {
    border-color: var(--text-accent);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15);
  }
  100% {
    border-color: var(--border-color);
    box-shadow: var(--shadow-sm);
  }
}

/* Giscus Container */
.giscus-frame-wrap {
  min-height: 220px;
  width: 100%;
  margin-top: 1rem;
}

@media (max-width: 640px) {
  .cupertino-comments-tree .children {
    margin-left: 0.75rem;
    padding-left: 0.5rem;
  }
  .comment-fields-grid {
    grid-template-columns: 1fr;
  }
  .form-submit-row {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-comment-submit {
    justify-content: center;
  }
  .comment-shortcut-hint {
    text-align: center;
  }
}


/* ==========================================================================
   FEATURE 1: Safari Reader & Display Controls Popover (`aA`)
   ========================================================================== */
.reader-controls-wrapper {
  position: relative;
  display: inline-flex;
}

.reader-btn-aa {
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: -0.05em;
  color: var(--text-accent);
}

.reader-controls-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 290px;
  background: var(--card-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.22), 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 1rem;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.97);
  transform-origin: top right;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.2s;
  pointer-events: none;
}

.reader-controls-popover.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.reader-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.reader-popover-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.reader-reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.reader-reset-btn:hover {
  color: var(--text-accent);
  background: var(--bg-hover);
}

.reader-control-row {
  margin-bottom: 0.85rem;
}
.reader-control-row:last-child {
  margin-bottom: 0;
}

.reader-row-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

/* Stepper (Font Size) */
.reader-size-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.25rem 0.5rem;
}

.stepper-btn {
  background: transparent;
  border: none;
  color: var(--text-primary);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.1s;
}

.stepper-btn:hover {
  background: var(--card-bg);
  color: var(--text-accent);
}
.stepper-btn:active {
  transform: scale(0.92);
}

.font-size-display {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Font Family Choices */
.reader-font-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
  background: var(--bg-secondary);
  padding: 0.25rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
}

.font-choice-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.4rem 0.2rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
  color: var(--text-secondary);
}

.font-choice-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.font-choice-btn.is-active {
  background: var(--card-bg);
  color: var(--text-accent);
  border-color: var(--border-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.font-preview {
  font-size: 0.95rem;
  line-height: 1;
}
.font-sf {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  font-weight: 600;
}
.font-ny {
  font-family: ui-serif, "New York", "Charter", "Georgia", serif;
  font-weight: 600;
}
.font-choice-btn .font-name {
  font-size: 0.7rem;
  font-weight: 500;
}

/* Width Choices */
.reader-width-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  background: var(--bg-secondary);
  padding: 0.25rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
}

.width-choice-btn {
  padding: 0.4rem 0.5rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.width-choice-btn:hover {
  color: var(--text-primary);
}

.width-choice-btn.is-active {
  background: var(--card-bg);
  color: var(--text-accent);
  border-color: var(--border-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Typography Overrides on .post-content */
.post-content {
  font-size: calc(var(--post-font-scale, 1) * 1.0625rem);
  transition: font-size 0.2s ease, max-width 0.25s ease;
}

.post-content.reader-font-new-york {
  font-family: ui-serif, "New York", "Charter", "Georgia", "Cambria", serif;
  line-height: 1.82;
  letter-spacing: -0.01em;
}

.post-content.reader-font-sf-mono {
  font-family: ui-monospace, "SF Mono", "Menlo", "Consolas", monospace;
  line-height: 1.76;
  letter-spacing: -0.02em;
  font-size: calc(var(--post-font-scale, 1) * 0.96rem);
}

.post-content.reader-width-focus {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   FEATURE 2: Floating macOS Text Selection Toolbar
   ========================================================================== */
.cupertino-selection-toolbar {
  position: absolute;
  top: 0;
  left: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.5rem;
  background: var(--nav-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.25), 0 2px 6px rgba(0, 0, 0, 0.08);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px) scale(0.95);
  transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.18s;
  pointer-events: none;
}

.cupertino-selection-toolbar.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.sel-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.6rem;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.1s;
  white-space: nowrap;
}

.sel-tool-btn:hover {
  background: var(--bg-hover);
  color: var(--text-accent);
}

.sel-tool-btn:active {
  transform: scale(0.95);
}

.sel-tool-divider {
  width: 1px;
  height: 16px;
  background: var(--border-color);
  margin: 0 0.1rem;
}

.sel-tool-arrow {
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 10px;
  height: 10px;
  background: var(--nav-bg);
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

/* ==========================================================================
   FEATURE 3: Related Engineering Posts Grid
   ========================================================================== */
.related-posts-pro {
  margin: 3.5rem 0 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.related-posts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.related-header-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.related-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-accent);
  box-shadow: 0 0 10px var(--text-accent);
  display: inline-block;
}

.related-section-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0;
}

.related-section-count {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  font-weight: 600;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.related-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.22s;
  display: flex;
  flex-direction: column;
}

.related-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 113, 227, 0.4);
  box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.12);
}

.related-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
}

.related-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.related-cat-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-accent);
}

.related-cat-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.related-read-time {
  font-size: 0.72rem;
  color: var(--text-tertiary);
}

.related-card-title {
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.38;
  color: var(--text-primary);
  margin: 0 0 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.15s;
}

.related-card:hover .related-card-title {
  color: var(--text-accent);
}

.related-card-excerpt {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

.related-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.related-card-arrow {
  color: var(--text-tertiary);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.15s;
  display: inline-flex;
}

.related-card:hover .related-card-arrow {
  transform: translateX(4px);
  color: var(--text-accent);
}

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


/* ==========================================================================
   VIEW TRANSITIONS API & INSTANT ANIMATIONS
   ========================================================================== */
@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: cupertinoFadeOut 0.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

::view-transition-new(root) {
  animation: cupertinoFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes cupertinoFadeOut {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(0.995); }
}

@keyframes cupertinoFadeIn {
  from { opacity: 0; transform: scale(1.005); }
  to { opacity: 1; transform: scale(1); }
}

/* ==========================================================================
   DYNAMIC ISLAND / STATUS CAPSULE
   ========================================================================== */
.cupertino-dynamic-island {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%) translateY(-60px) scale(0.92);
  z-index: 999;
  background: rgba(18, 18, 20, 0.88);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 16px 36px -6px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.2);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  opacity: 0;
  visibility: hidden;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.25s;
  pointer-events: none;
}

[data-theme="light"] .cupertino-dynamic-island {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 16px 36px -6px rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.cupertino-dynamic-island.is-scrolled {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0) scale(1);
  pointer-events: auto;
}

.island-inner {
  display: flex;
  align-items: center;
}

.island-state {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  white-space: nowrap;
}

.island-radar-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34c759;
  box-shadow: 0 0 8px #34c759;
}

.island-label {
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.island-separator {
  color: var(--text-tertiary);
  opacity: 0.6;
}

.island-status {
  font-size: 0.72rem;
  color: #34c759;
  font-weight: 600;
}

.circular-chart {
  display: block;
  max-width: 16px;
  max-height: 16px;
}

.circle-bg {
  fill: none;
  stroke: var(--border-color);
  stroke-width: 3.5;
}

.circle-val {
  fill: none;
  stroke: var(--text-accent);
  stroke-width: 3.5;
  stroke-linecap: round;
  transition: stroke-dasharray 0.15s ease;
}

.island-pct {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.76rem;
}

.island-title-snip {
  color: var(--text-secondary);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.island-btn-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  margin-left: 0.2rem;
  transition: background 0.15s, color 0.15s;
}

.island-btn-top:hover {
  background: var(--bg-hover);
  color: var(--text-accent);
}

/* ==========================================================================
   APPLE CALLOUT / ADMONITION BLOCKS
   ========================================================================== */
.apple-callout {
  margin: 1.85rem 0;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  border-left-width: 4px;
  padding: 1.15rem 1.25rem;
  background: var(--card-bg);
  position: relative;
  overflow: hidden;
}

.apple-callout .callout-header {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.apple-callout .callout-body {
  font-size: 0.95rem;
  line-height: 1.62;
  color: var(--text-primary);
}

.apple-callout .callout-body p:last-child {
  margin-bottom: 0;
}

/* 1. Note (Apple Blue) */
.apple-callout.callout-note {
  border-left-color: #0071e3;
  background: rgba(0, 113, 227, 0.04);
}
.apple-callout.callout-note .callout-header {
  color: #0071e3;
}

/* 2. Tip (Emerald Green) */
.apple-callout.callout-tip {
  border-left-color: #34c759;
  background: rgba(52, 199, 89, 0.04);
}
.apple-callout.callout-tip .callout-header {
  color: #34c759;
}

/* 3. Warning (Amber Yellow) */
.apple-callout.callout-warning {
  border-left-color: #ff9500;
  background: rgba(255, 149, 0, 0.04);
}
.apple-callout.callout-warning .callout-header {
  color: #ff9500;
}

/* 4. Caution (Coral Red) */
.apple-callout.callout-caution {
  border-left-color: #ff3b30;
  background: rgba(255, 59, 48, 0.04);
}
.apple-callout.callout-caution .callout-header {
  color: #ff3b30;
}

/* ==========================================================================
   PAGE TEMPLATES: USES, CHANGELOG, STATS
   ========================================================================== */
.page-header-pro {
  margin: 2.5rem 0 3.5rem;
}

.page-header-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
}

.page-title-pro {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.15;
  margin: 0 0 0.85rem;
}

.page-subtitle-pro {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 720px;
  margin: 0;
}

/* Uses Template */
.uses-category-section {
  margin-bottom: 3.5rem;
}

.uses-cat-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.uses-cat-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-accent);
}

.uses-cat-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0;
}

.uses-cat-subtitle {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.uses-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

.uses-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.35rem;
  transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s;
  display: flex;
  flex-direction: column;
}

.uses-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 113, 227, 0.4);
  box-shadow: 0 14px 30px -8px rgba(0, 0, 0, 0.12);
}

.uses-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.uses-brand {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-accent);
}

.uses-badge-pill {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

.uses-item-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.5rem;
}

.uses-item-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0 0 1rem;
  flex-grow: 1;
}

.uses-item-meta {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  padding-top: 0.6rem;
  border-top: 1px solid var(--border-color);
}

/* Changelog Timeline */
.changelog-timeline {
  position: relative;
  padding-left: 2rem;
}

.changelog-timeline::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 7px;
  width: 2px;
  background: var(--border-color);
}

.changelog-entry {
  position: relative;
  margin-bottom: 3.5rem;
}

.changelog-entry::before {
  content: "";
  position: absolute;
  top: 6px;
  left: -2rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 3px solid var(--text-accent);
  box-shadow: 0 0 0 4px var(--bg-primary);
  z-index: 2;
}

.changelog-aside {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.changelog-version-tag {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

.changelog-date {
  font-size: 0.82rem;
  color: var(--text-tertiary);
}

.changelog-status-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  letter-spacing: 0.04em;
}

.changelog-status-pill.badge-latest {
  background: rgba(52, 199, 89, 0.15);
  color: #34c759;
}

.changelog-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.changelog-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.changelog-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.changelog-commit {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.changelog-summary {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0 0 1.25rem;
}

.changelog-sections {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.changelog-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.change-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 5px;
  width: fit-content;
  letter-spacing: 0.04em;
}

.change-tag.tag-added {
  background: rgba(52, 199, 89, 0.15);
  color: #34c759;
}

.change-tag.tag-improved {
  background: rgba(0, 113, 227, 0.15);
  color: #0071e3;
}

.change-tag.tag-fixed {
  background: rgba(255, 149, 0, 0.15);
  color: #ff9500;
}

.change-list {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.6;
}

/* Stats Template */
.stats-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.stats-kpi-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.stats-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.stats-kpi-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-tertiary);
}

.stats-kpi-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-accent);
}

.stats-kpi-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 0.35rem;
}

.stats-kpi-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.stats-section-panel {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.stats-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.stats-panel-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.stats-panel-sub {
  font-size: 0.72rem;
  color: var(--text-tertiary);
}

.stats-badge-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

/* Language Stack Bar */
.lang-stack-bar {
  display: flex;
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.stack-segment {
  height: 100%;
  transition: opacity 0.15s;
}

.stack-segment:hover {
  opacity: 0.85;
}

.segment-swift { background: #F05138; }
.segment-rust  { background: #DEA584; }
.segment-ts    { background: #3178C6; }
.segment-go    { background: #00ADD8; }
.segment-other { background: #9B59B6; }

.lang-legend-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-name {
  font-weight: 500;
  color: var(--text-primary);
}

.legend-pct {
  color: var(--text-tertiary);
}

/* Heatmap Grid */
.activity-heatmap-wrap {
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.activity-heatmap-grid {
  display: grid;
  grid-template-rows: repeat(7, 12px);
  grid-auto-flow: column;
  grid-auto-columns: 12px;
  gap: 3px;
  width: max-content;
}

.heatmap-cell {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--bg-secondary);
  transition: transform 0.1s, opacity 0.1s;
}

.heatmap-cell:hover {
  transform: scale(1.35);
  z-index: 10;
}

.heatmap-cell.lvl-0 { background: var(--bg-secondary); }
.heatmap-cell.lvl-1 { background: rgba(52, 199, 89, 0.28); }
.heatmap-cell.lvl-2 { background: rgba(52, 199, 89, 0.5); }
.heatmap-cell.lvl-3 { background: rgba(52, 199, 89, 0.75); }
.heatmap-cell.lvl-4 { background: #34c759; }

.heatmap-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

.heatmap-scale {
  display: flex;
  gap: 3px;
}

.scale-box {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}
.scale-box.lvl-0 { background: var(--bg-secondary); }
.scale-box.lvl-1 { background: rgba(52, 199, 89, 0.28); }
.scale-box.lvl-2 { background: rgba(52, 199, 89, 0.5); }
.scale-box.lvl-3 { background: rgba(52, 199, 89, 0.75); }
.scale-box.lvl-4 { background: #34c759; }

.heatmap-caption {
  font-size: 0.7rem;
  color: var(--text-tertiary);
}


/* ==========================================================================
   MACOS NOTIFICATION TOAST (Vakit: Namaz Vakitleri & Kıble Promo)
   ========================================================================== */
.macos-notification-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 380px;
  max-width: calc(100vw - 32px);
  z-index: 9999;
  background: rgba(22, 22, 26, 0.85);
  backdrop-filter: blur(32px) saturate(200%);
  -webkit-backdrop-filter: blur(32px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  box-shadow: 0 24px 50px -12px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateX(120%) scale(0.92);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.35s ease,
              visibility 0.35s;
  pointer-events: none;
}

[data-theme="light"] .macos-notification-toast {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 24px 50px -12px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.macos-notification-toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(0) scale(1);
  pointer-events: auto;
}

.macos-notification-toast.is-hiding {
  opacity: 0;
  visibility: hidden;
  transform: translateX(120%) scale(0.92);
  pointer-events: none;
}

.notif-inner {
  padding: 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

/* Header */
.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notif-app-info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.notif-icon-frame {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #064e3b 0%, #022c22 100%);
  border: 1px solid rgba(52, 211, 153, 0.3);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-meta-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.notif-app-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  line-height: 1.25;
}

.notif-app-sub {
  font-size: 0.68rem;
  color: #34d399;
  font-weight: 600;
}

.notif-header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.notif-time {
  font-size: 0.7rem;
  color: var(--text-tertiary);
}

.notif-btn-close {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.notif-btn-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* Body */
.notif-body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.notif-title {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
}

.notif-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.48;
  margin: 0;
}

.notif-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.notif-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.notif-pill.pill-green {
  background: rgba(52, 211, 153, 0.12);
  color: #10b981;
  border-color: rgba(52, 211, 153, 0.25);
}

.notif-pill .pill-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

/* Actions */
.notif-actions {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.notif-act-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.notif-act-btn.btn-snooze {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.notif-act-btn.btn-snooze:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.notif-act-btn.btn-install {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.3);
}

.notif-act-btn.btn-install:hover {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(5, 150, 105, 0.4);
  color: #ffffff;
}

.notif-act-btn.btn-install:active {
  transform: translateY(0);
}

@media (max-width: 640px) {
  .macos-notification-toast {
    bottom: 74px;
    right: 12px;
    left: 12px;
    width: auto;
    max-width: none;
  }
}


/* ==========================================================================
   MÜHENDİSLİK NOTLARI & YAZILAR (HERO, SEGMENTED VIEWS, TOPIC PILLS)
   ========================================================================== */

/* Section Header */
.articles-section {
  margin-top: 3.5rem;
  margin-bottom: 4rem;
}

.articles-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.section-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-accent);
  box-shadow: 0 0 10px var(--text-accent);
}

.articles-count-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  background: var(--bg-secondary);
  color: var(--text-tertiary);
  border: 1px solid var(--border-color);
}

/* macOS Segmented Controller (View Mode Switcher) */
.view-mode-switcher {
  display: inline-flex;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.2rem;
  gap: 0.2rem;
}

.view-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  background: transparent;
  border: none;
  border-radius: 7px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.view-mode-btn:hover {
  color: var(--text-primary);
}

.view-mode-btn.is-active {
  background: var(--card-bg);
  color: var(--text-accent);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* Live Topic & Category Filter Bar */
.topic-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 0.2rem 0 0.85rem;
  margin-bottom: 1.5rem;
  scrollbar-width: none;
}
.topic-filter-bar::-webkit-scrollbar {
  display: none;
}

.topic-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.topic-pill:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-color-hover);
}

.topic-pill.is-active {
  background: rgba(0, 113, 227, 0.1);
  color: var(--text-accent);
  border-color: rgba(0, 113, 227, 0.35);
  font-weight: 600;
}

.topic-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.8;
}

.topic-count {
  font-size: 0.7rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: var(--bg-secondary);
  color: var(--text-tertiary);
}
.topic-pill.is-active .topic-count {
  background: rgba(0, 113, 227, 0.2);
  color: var(--text-accent);
}

/* ==========================================================================
   FEATURED HERO ARCHITECTURE ARTICLE SPOTLIGHT
   ========================================================================== */
.featured-hero-article {
  margin-bottom: 2rem;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s, opacity 0.25s;
}

.featured-hero-inner {
  display: flex;
  align-items: stretch;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.1);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.featured-hero-inner:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 113, 227, 0.4);
  box-shadow: 0 20px 40px -10px rgba(0, 113, 227, 0.18);
}

.hero-left-content {
  flex: 1;
  padding: 2rem 2.25rem;
  display: flex;
  flex-direction: column;
}

.hero-header-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.hero-spotlight-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  background: rgba(0, 113, 227, 0.12);
  color: var(--text-accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.radar-dot-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-accent);
  box-shadow: 0 0 8px var(--text-accent);
}

.hero-category-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.hero-category-chip .chip-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-accent);
}

.hero-ref-id {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  margin-left: auto;
}

.hero-article-title {
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  line-height: 1.25;
  margin: 0 0 0.85rem;
  transition: color 0.15s;
}

.featured-hero-inner:hover .hero-article-title {
  color: var(--text-accent);
}

.hero-article-excerpt {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 1.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

.hero-footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.78rem;
  color: var(--text-tertiary);
}

.hero-meta-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-accent);
  transition: transform 0.2s ease;
}

.featured-hero-inner:hover .hero-cta-btn svg {
  transform: translateX(4px);
}

.hero-right-visual {
  width: 320px;
  min-height: 100%;
  position: relative;
  overflow: hidden;
}

.hero-image-frame {
  width: 100%;
  height: 100%;
  position: relative;
}

.hero-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.featured-hero-inner:hover .hero-thumb-img {
  transform: scale(1.05);
}

.hero-glass-glint {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

@media (max-width: 860px) {
  .featured-hero-inner {
    flex-direction: column-reverse;
  }
  .hero-right-visual {
    width: 100%;
    height: 200px;
  }
}

/* ==========================================================================
   POST CARD PRO & 3 VIEW MODES
   ========================================================================== */
.post-card-pro-wrapper {
  transition: opacity 0.25s, transform 0.25s;
}

.post-card-pro {
  display: block;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.22s;
}

.post-card-pro:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 113, 227, 0.4);
  box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.12);
}

/* Top Meta */
.card-top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.card-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-accent);
}

.cat-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.card-meta-right {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.74rem;
  color: var(--text-tertiary);
}

.card-comments-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-secondary);
}

/* Main Row */
.card-main-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
}

.card-text-col {
  flex: 1;
}

.card-title-pro {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  line-height: 1.35;
  margin: 0 0 0.5rem;
  transition: color 0.15s;
}

.post-card-pro:hover .card-title-pro {
  color: var(--text-accent);
}

.card-excerpt-pro {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0 0 0.85rem;
}

.card-tags-pro {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tag-item-pro {
  font-size: 0.72rem;
  padding: 0.1rem 0.45rem;
  border-radius: 5px;
  background: var(--bg-secondary);
  color: var(--text-tertiary);
}

/* Thumb */
.card-thumb-col {
  width: 110px;
  height: 80px;
  flex-shrink: 0;
}

.card-thumb-frame {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-color);
}

.card-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.post-card-pro:hover .card-thumb-img {
  transform: scale(1.08);
}

.card-thumb-glint {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

/* Bottom Bar */
.card-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  margin-top: 0.85rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.card-read-more {
  color: var(--text-accent);
  font-weight: 600;
}

.card-arrow-icon {
  color: var(--text-accent);
  transition: transform 0.2s ease;
}

.post-card-pro:hover .card-arrow-icon {
  transform: translateX(4px);
}

/* ==========================================================================
   MODE 1: DETAILED VIEW (DEFAULT)
   ========================================================================== */
.post-list.view-mode-detailed {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.post-list.view-mode-detailed .card-compact-row {
  display: none;
}

.post-list.view-mode-detailed .card-full-content {
  display: block;
  padding: 1.35rem 1.5rem;
}

/* ==========================================================================
   MODE 2: GRID VIEW (2-COLUMN CARDS)
   ========================================================================== */
.post-list.view-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.post-list.view-mode-grid .card-compact-row {
  display: none;
}

.post-list.view-mode-grid .card-full-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.25rem;
}

.post-list.view-mode-grid .card-main-row {
  flex-direction: column-reverse;
  flex-grow: 1;
}

.post-list.view-mode-grid .card-thumb-col {
  width: 100%;
  height: 140px;
  margin-bottom: 0.85rem;
}

.post-list.view-mode-grid .card-excerpt-pro {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 768px) {
  .post-list.view-mode-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   MODE 3: COMPACT TERMINAL ROW VIEW
   ========================================================================== */
.post-list.view-mode-compact {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.post-list.view-mode-compact .card-full-content {
  display: none;
}

.post-list.view-mode-compact .post-card-pro {
  border-radius: 8px;
}

.post-list.view-mode-compact .card-compact-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 1rem;
  font-size: 0.82rem;
  color: var(--text-primary);
}

.post-list.view-mode-compact .compact-date {
  color: var(--text-tertiary);
  font-size: 0.76rem;
}

.post-list.view-mode-compact .compact-sep {
  color: var(--text-tertiary);
  opacity: 0.5;
}

.post-list.view-mode-compact .compact-cat {
  color: var(--text-accent);
  font-weight: 600;
  font-size: 0.76rem;
}

.post-list.view-mode-compact .compact-title {
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 50%;
  transition: color 0.15s;
}

.post-list.view-mode-compact .post-card-pro:hover .compact-title {
  color: var(--text-accent);
}

.post-list.view-mode-compact .compact-fill {
  flex-grow: 1;
}

.post-list.view-mode-compact .compact-time {
  font-size: 0.74rem;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.post-list.view-mode-compact .compact-arrow {
  color: var(--text-accent);
  transition: transform 0.15s ease;
}

.post-list.view-mode-compact .post-card-pro:hover .compact-arrow {
  transform: translateX(3px) translateY(-1px);
}


/* ==========================================================================
   macOS Acoustic & Haptic Sound Toggle Button
   ========================================================================== */
.sound-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.sound-toggle-btn:hover {
  background: var(--bg-hover);
  color: var(--text-accent);
  border-color: var(--border-color-hover);
  transform: translateY(-1px);
}

.sound-toggle-btn.is-muted {
  opacity: 0.65;
  color: var(--text-tertiary);
}

/* ==========================================================================
   macOS Kernel Panic & System Diagnostics (404 Page)
   ========================================================================== */
.kernel-panic-wrapper {
  margin: 2.5rem 0 4rem;
}

.panic-terminal-window {
  background: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg, 14px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

[data-theme="dark"] .panic-terminal-window {
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.65);
}

.panic-window-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: #161b22;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.panic-window-header .traffic-lights {
  display: flex;
  align-items: center;
  gap: 7px;
}

.panic-window-header .traffic-lights .light {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}

.panic-window-header .traffic-lights .light.red { background: #FF5F56; }
.panic-window-header .traffic-lights .light.yellow { background: #FFBD2E; }
.panic-window-header .traffic-lights .light.green { background: #27C93F; }

.panic-window-title {
  font-size: 0.76rem;
  color: #8b949e;
  letter-spacing: 0.03em;
}

.panic-window-status {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 69, 58, 0.18);
  color: #FF453A;
  border: 1px solid rgba(255, 69, 58, 0.35);
}

.panic-terminal-body {
  padding: 2rem 2.25rem;
  color: #c9d1d9;
  font-size: 0.88rem;
  line-height: 1.65;
}

.panic-log-line {
  margin-bottom: 0.6rem;
  word-break: break-all;
}

.panic-log-line.log-critical {
  color: #FF7B72;
  font-weight: 600;
}

.panic-log-line.log-critical .log-prefix {
  color: #FF453A;
  margin-right: 0.5rem;
}

.panic-log-line.log-dim {
  color: #8b949e;
  font-size: 0.8rem;
}

.panic-log-line.log-dim .log-prefix {
  color: #58a6ff;
  margin-right: 0.4rem;
}

.panic-message-block {
  margin: 2rem 0 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.panic-title {
  font-size: 1.65rem;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0 0 0.6rem;
  letter-spacing: -0.02em;
}

.panic-desc {
  font-size: 0.96rem;
  color: #8b949e;
  line-height: 1.6;
  margin: 0;
  max-width: 680px;
}

.panic-actions-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 1.75rem;
  flex-wrap: wrap;
}

.panic-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: var(--radius-sm, 8px);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.18s ease;
}

.panic-btn.btn-home {
  background: var(--apple-blue, #0071E3);
  color: #ffffff;
  border: 1px solid transparent;
}

.panic-btn.btn-home:hover {
  background: #0077ED;
  transform: translateY(-1px);
}

.panic-btn.btn-spotlight {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.panic-btn.btn-spotlight:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.panic-recovery-section {
  margin-top: 3.5rem;
}

.panic-recovery-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   Intelligent Search Page (search.php)
   ========================================================================== */
.search-header-pro {
  margin: 2rem 0 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.search-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.search-meta-bar {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.search-meta-bar .status-indicator-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--apple-blue, #0071E3);
  display: inline-block;
  box-shadow: 0 0 6px rgba(0, 113, 227, 0.45);
}

.search-found-pill {
  font-weight: 600;
  color: var(--text-accent);
  background: var(--badge-bg);
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.74rem;
}

.search-query-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  margin: 0 0 1.5rem;
  line-height: 1.2;
}

.search-query-title .query-quote {
  color: var(--text-accent);
  opacity: 0.7;
}

.search-refine-form-pro {
  max-width: 620px;
}

.search-input-pill {
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 0.35rem 0.45rem 0.35rem 1rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-sm);
}

.search-input-pill:focus-within {
  border-color: var(--border-focus);
  background: var(--bg-primary);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

.search-input-pill svg {
  color: var(--text-tertiary);
  flex-shrink: 0;
  margin-right: 0.6rem;
}

.search-text-input {
  flex-grow: 1;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.88rem;
  outline: none;
  padding: 0.35rem 0;
}

.search-submit-btn {
  background: var(--text-accent);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 0.4rem 1.1rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.search-submit-btn:hover {
  background: var(--text-accent-hover);
  transform: scale(1.02);
}

/* Empty Search Results Card */
.search-empty-card {
  margin: 2rem 0;
  border-radius: var(--radius-lg, 14px);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.empty-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.76rem;
  color: var(--text-tertiary);
}

.empty-card-body {
  padding: 2.25rem 2rem;
  max-width: 640px;
}

.empty-card-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.6rem;
}

.empty-card-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 1.5rem;
}

.empty-tips-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.75rem;
}

.empty-tips-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.empty-tips-list .tip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-accent);
}

.empty-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.empty-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.15rem;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.empty-action-btn:hover {
  border-color: var(--border-color-hover);
  color: var(--text-accent);
  transform: translateY(-1px);
}

/* ==========================================================================
   Single Project Showcase (single-project.php)
   ========================================================================== */
.project-showcase-main {
  padding-bottom: 4rem;
}

.single-project-pro {
  margin-top: 1rem;
}

.project-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-tertiary);
  margin-bottom: 2rem;
}

.project-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

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

.project-current-name {
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-hero-header {
  margin-bottom: 2.5rem;
}

.project-hero-identity {
  display: flex;
  align-items: flex-start;
  gap: 1.75rem;
  margin-bottom: 2.25rem;
}

@media (max-width: 680px) {
  .project-hero-identity {
    flex-direction: column;
    gap: 1.25rem;
  }
}

.project-app-squircle {
  position: relative;
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(0, 113, 227, 0.15) 0%, rgba(52, 199, 89, 0.12) 100%);
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-squircle-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-squircle-fallback {
  color: var(--text-accent);
}

.squircle-glass-glint {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

[data-theme="dark"] .squircle-glass-glint {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 100%);
}

.project-hero-titles {
  flex-grow: 1;
}

.project-spec-pills {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.project-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  font-size: 0.74rem;
  border-radius: 999px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.project-pill.lang-pill strong {
  color: var(--text-primary);
}

.pill-dot-active {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34C759;
  display: inline-block;
}

.project-headline {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin: 0 0 0.85rem;
}

@media (max-width: 680px) {
  .project-headline {
    font-size: 2rem;
  }
}

.project-lead-excerpt {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 1.5rem;
  max-width: 720px;
}

.project-actions-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.project-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: var(--apple-blue, #0071E3);
  color: #ffffff;
  text-decoration: none;
  transition: all 0.18s ease;
  box-shadow: 0 2px 8px rgba(0, 113, 227, 0.25);
}

.project-btn-primary:hover {
  background: var(--text-accent-hover);
  box-shadow: 0 4px 14px rgba(0, 113, 227, 0.35);
  transform: translateY(-1px);
}

.project-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.18s ease;
}

.project-btn-secondary:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-color-hover);
  color: var(--text-accent);
  transform: translateY(-1px);
}

.project-btn-clone {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 1rem;
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px dashed var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.18s ease;
}

.project-btn-clone:hover,
.project-btn-clone.is-copied {
  border-color: var(--text-accent);
  color: var(--text-accent);
  background: var(--badge-bg);
}

/* macOS Project Terminal Box */
.project-terminal-window {
  background: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md, 10px);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  margin-top: 1.5rem;
}

.project-terminal-window .terminal-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  background: #161b22;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.project-terminal-window .terminal-traffic-lights {
  display: flex;
  gap: 6px;
}

.project-terminal-window .traffic-light {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.traffic-light.light-red { background: #FF5F56; }
.traffic-light.light-yellow { background: #FFBD2E; }
.traffic-light.light-green { background: #27C93F; }

.project-terminal-window .terminal-title {
  font-size: 0.74rem;
  color: #8b949e;
}

.terminal-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #c9d1d9;
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.65rem;
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.terminal-copy-btn:hover,
.terminal-copy-btn.is-copied {
  background: rgba(255, 255, 255, 0.12);
  color: #34C759;
  border-color: #34C759;
}

.project-terminal-window .terminal-body {
  padding: 1.15rem 1.25rem;
  font-size: 0.84rem;
  line-height: 1.7;
  color: #c9d1d9;
}

.terminal-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.terminal-comment {
  color: #6e7681;
  font-style: italic;
}

.terminal-prompt {
  color: #58a6ff;
  user-select: none;
}

.terminal-cmd {
  color: #f0f6fc;
}

.terminal-output {
  margin-top: 0.35rem;
}

.terminal-success {
  color: #34C759;
  font-size: 0.78rem;
}

/* Project Specs Matrix */
.project-specs-matrix {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 2.5rem 0 3rem;
}

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

@media (max-width: 520px) {
  .project-specs-matrix {
    grid-template-columns: 1fr;
  }
}

.matrix-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.1rem;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.matrix-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-color-hover);
}

.matrix-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--badge-bg);
  color: var(--text-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
}

.matrix-label {
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
  margin-bottom: 0.35rem;
}

.matrix-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
  line-height: 1.35;
}

.matrix-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.project-body-content {
  margin: 2.5rem 0 3.5rem;
}

/* ==========================================================================
   Apple Engineering Dispatch Newsletter & RSS Card
   ========================================================================== */
.newsletter-dispatch-section {
  margin: 4rem 0 2rem;
}

.newsletter-dispatch-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl, 18px);
  padding: 2.5rem 2.25rem;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

[data-theme="dark"] .newsletter-dispatch-card {
  background: rgba(30, 30, 32, 0.7);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
}

.newsletter-dispatch-card:hover {
  border-color: var(--border-color-hover);
}

.dispatch-header {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.dispatch-icon-badge {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 113, 227, 0.18) 0%, rgba(0, 113, 227, 0.05) 100%);
  border: 1px solid rgba(0, 113, 227, 0.25);
  color: var(--text-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dispatch-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-accent);
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
}

.dispatch-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--apple-blue, #0071E3);
  box-shadow: 0 0 6px var(--apple-blue);
  animation: radar-pulse 2s infinite;
}

.dispatch-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.45rem;
  letter-spacing: -0.02em;
}

.dispatch-subtitle {
  font-size: 0.94rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
  max-width: 640px;
}

.dispatch-action-area {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.dispatch-form {
  flex-grow: 1;
  max-width: 480px;
}

.dispatch-input-group {
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.35rem 0.25rem 0.85rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.dispatch-input-group:focus-within {
  background: var(--bg-primary);
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

.dispatch-input-icon {
  color: var(--text-tertiary);
  margin-right: 0.6rem;
  display: flex;
  align-items: center;
}

.dispatch-email-input {
  flex-grow: 1;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.88rem;
  outline: none;
  padding: 0.4rem 0;
}

.dispatch-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--apple-blue, #0071E3);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.45rem 1.05rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.dispatch-submit-btn:hover {
  background: var(--text-accent-hover);
  transform: translateY(-1px);
}

.dispatch-status-msg {
  margin-top: 0.65rem;
}

.dispatch-success-box {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: #34C759;
  background: rgba(52, 199, 89, 0.1);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(52, 199, 89, 0.25);
}

.dispatch-divider {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  font-style: italic;
}

.dispatch-rss-block {
  flex-shrink: 0;
}

.dispatch-rss-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.15rem;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
}

.dispatch-rss-btn:hover,
.dispatch-rss-btn.is-copied {
  border-color: var(--border-color-hover);
  color: var(--text-accent);
  background: var(--bg-tertiary);
  transform: translateY(-1px);
}

.dispatch-footer {
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
}

.dispatch-privacy {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.76rem;
  color: var(--text-tertiary);
}


/* ==========================================================================
   ADVANCED APPLE CUPERTINO ULTRA MOBILE OPTIMIZATION (iOS / iPadOS / Android)
   ========================================================================== */

/* 1. iOS Safe Area Root & Body Adjustments */
:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

@supports (padding: env(safe-area-inset-bottom)) {
  body {
    padding-left: var(--safe-left);
    padding-right: var(--safe-right);
  }
}

/* 2. Global Mobile Touch & Text Selection Protection & Compact Typography */
@media (max-width: 768px), (pointer: coarse) {
  /* Prevent iOS Safari 16px auto-zoom glitch on input focus */
  input[type="text"],
  input[type="search"],
  input[type="email"],
  input[type="url"],
  input[type="password"],
  input[type="number"],
  input[type="tel"],
  textarea,
  select {
    font-size: 16px !important;
  }

  /* Smooth native iOS inertial scrolling for all scroll containers */
  pre,
  .post-content table,
  .topic-filter-bar,
  .post-header-actions-pro,
  .terminal-body {
    -webkit-overflow-scrolling: touch;
  }

  /* Hide floating text toolbar on mobile to let native iOS selection callout work */
  .cupertino-selection-toolbar {
    display: none !important;
  }

  /* Native Apple HIG Compact Mobile Typography & Hierarchy */
  body {
    font-size: 0.92rem;
    line-height: 1.55;
  }

  .dev-bio-text {
    font-size: 0.86rem;
    line-height: 1.52;
    margin-bottom: 0.85rem;
  }

  .dev-status-pill {
    padding: 0.22rem 0.6rem;
    font-size: 0.70rem;
    margin-bottom: 0.85rem;
  }

  .dev-hero {
    margin-bottom: 2.25rem;
  }

  .dev-avatar-wrap .dev-avatar-frame {
    width: 52px;
    height: 52px;
    border-radius: 14px;
  }

  .dev-name-row h1 {
    font-size: 1.45rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
  }

  .dev-role {
    font-size: 0.82rem;
  }

  .dev-tech-stack {
    gap: 0.35rem;
    margin-bottom: 0.85rem;
  }

  .tech-tag {
    padding: 0.16rem 0.48rem;
    font-size: 0.70rem;
    border-radius: 5px;
  }

  .dev-links {
    gap: 0.6rem;
    font-size: 0.78rem;
  }

  .dev-links a {
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: var(--bg-secondary);
    font-size: 0.75rem;
  }

  /* Section Titles & Actions */
  .section-heading {
    margin-bottom: 0.85rem;
  }

  .section-title {
    font-size: 1.05rem;
    letter-spacing: -0.015em;
  }

  .section-action,
  .articles-count-pill {
    font-size: 0.70rem;
  }

  /* Projects Section Grid & Cards */
  .projects-grid {
    gap: 0.75rem;
  }

  .project-card {
    padding: 0.9rem 1rem;
    border-radius: 14px;
  }

  .project-icon {
    width: 28px;
    height: 28px;
  }

  .project-icon svg {
    width: 16px;
    height: 16px;
  }

  .project-title {
    font-size: 0.92rem;
  }

  .project-desc {
    font-size: 0.80rem;
    line-height: 1.45;
    margin-bottom: 0.6rem;
  }

  .project-meta {
    font-size: 0.70rem;
  }

  /* Topic Filter Pills (Smooth iOS Horizontal Chips) */
  .topic-filter-bar {
    gap: 0.35rem;
    padding-bottom: 0.45rem;
  }

  .topic-pill {
    padding: 0.24rem 0.58rem;
    font-size: 0.72rem;
    border-radius: 999px;
    height: 27px;
  }

  .topic-pill .topic-count {
    font-size: 0.64rem;
    padding: 0.08rem 0.3rem;
  }

  /* Post Card Pro Ultra-Lightweight Mobile Scaling */
  .post-card-pro-wrapper {
    margin-bottom: 0.75rem;
  }

  .card-full-content {
    padding: 0.9rem 1rem;
  }

  .card-cat-badge {
    font-size: 0.68rem;
    padding: 0.14rem 0.45rem;
  }

  .card-meta-right {
    font-size: 0.68rem;
    gap: 0.4rem;
  }

  .card-title-pro {
    font-size: 0.98rem;
    line-height: 1.32;
  }

  .card-excerpt-pro {
    font-size: 0.80rem;
    line-height: 1.45;
  }

  .card-tags-pro .tag-item-pro {
    font-size: 0.66rem;
    padding: 0.1rem 0.35rem;
  }

  .card-bottom-bar {
    margin-top: 0.65rem;
    padding-top: 0.55rem;
  }

  .card-read-more {
    font-size: 0.72rem;
  }

  .card-social-btn {
    padding: 0.2rem 0.45rem;
    font-size: 0.70rem;
    gap: 0.25rem;
  }
}

/* 3. Mobile Header & Dynamic Island Polish */
@media (max-width: 640px) {
  .site-header {
    padding-left: max(0.5rem, var(--safe-left));
    padding-right: max(0.5rem, var(--safe-right));
  }

  .site-container,
  .site-container-wide {
    padding: 0 0.85rem;
  }

  .site-main {
    padding: 1.25rem 0 3.5rem;
  }

  /* Compact Brand text so utility buttons never collide */
  .brand-title {
    max-width: 145px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.90rem;
  }

  .brand-subtitle {
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.62rem;
  }

  /* Compact Lightweight Header Action Buttons */
  .header-actions {
    gap: 0.35rem;
  }

  .spotlight-trigger {
    padding: 0;
    width: 30px;
    height: 30px;
    justify-content: center;
    border-radius: 999px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
  }

  .spotlight-trigger svg {
    width: 14px;
    height: 14px;
  }

  .spotlight-trigger span,
  .spotlight-trigger kbd {
    display: none;
  }

  .sound-toggle-btn,
  .theme-toggle-btn {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
  }

  .sound-toggle-btn svg,
  .theme-toggle-btn svg {
    width: 15px;
    height: 15px;
  }

  /* Dynamic Island on Mobile */
  .cupertino-dynamic-island {
    top: max(8px, var(--safe-top));
    max-width: calc(100vw - 2rem);
    padding: 0.25rem 0.55rem;
    font-size: 0.72rem;
  }

  .island-title-snip {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* 4. Native iOS App Notification Placement (Above Mobile Dock) */
@media (max-width: 960px) {
  .macos-notification-toast {
    bottom: calc(82px + env(safe-area-inset-bottom, 0.75rem));
    left: 1rem;
    right: 1rem;
    width: auto;
    max-width: 480px;
    margin: 0 auto;
    border-radius: 18px;
    transform: translateY(140%) scale(0.95);
  }

  .macos-notification-toast.is-visible {
    transform: translateY(0) scale(1);
  }

  .macos-notification-toast.is-hiding {
    transform: translateY(140%) scale(0.95);
  }

  .notif-inner {
    padding: 0.95rem 1.05rem;
  }

  .notif-app-title {
    font-size: 0.7rem;
    line-height: 1.25;
  }

  .notif-body .notif-title {
    font-size: 0.88rem;
  }

  .notif-body .notif-desc {
    font-size: 0.78rem;
    line-height: 1.45;
  }
}

/* 5. Mobile Tab Bar Tactile Micro-Interactions */
@media (max-width: 960px) {
  .tab-item:active {
    transform: scale(0.90);
  }

  .tab-item.is-active .tab-icon {
    transform: translateY(-1px);
    color: var(--text-accent);
  }
}

@media (max-width: 380px) {
  .mobile-tab-bar {
    height: 58px;
    padding: 0 0.25rem;
    bottom: max(0.5rem, var(--safe-bottom));
  }

  .tab-item {
    font-size: 0.62rem;
    gap: 2px;
  }

  .tab-item svg {
    width: 18px;
    height: 18px;
  }
}

/* 6. View Mode Switcher on Mobile (Ultra Compact iOS Segmented Control) */
@media (max-width: 540px) {
  .articles-section-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .view-mode-switcher {
    width: 100%;
    display: flex;
    height: 30px;
    padding: 2px;
    border-radius: 999px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
  }

  .view-mode-btn {
    flex: 1;
    justify-content: center;
    padding: 0.2rem 0.45rem;
    font-size: 0.68rem;
    height: 24px;
    border-radius: 999px;
    gap: 0.25rem;
  }

  .view-mode-btn svg {
    width: 12px;
    height: 12px;
  }
}

/* 7. Featured Hero Article Mobile Scaling */
@media (max-width: 640px) {
  .featured-hero-article {
    margin-bottom: 1.25rem;
    border-radius: 16px;
  }

  .hero-left-content {
    padding: 0.95rem 1rem;
  }

  .hero-spotlight-pill {
    font-size: 0.64rem;
    padding: 0.12rem 0.4rem;
  }

  .hero-category-chip {
    font-size: 0.66rem;
  }

  .hero-ref-id {
    display: none;
  }

  .hero-article-title {
    font-size: 1.15rem;
    line-height: 1.28;
    margin-bottom: 0.45rem;
  }

  .hero-article-excerpt {
    font-size: 0.82rem;
    line-height: 1.45;
    margin-bottom: 0.75rem;
    -webkit-line-clamp: 2;
  }

  .hero-cta-btn {
    font-size: 0.74rem;
    padding: 0.32rem 0.75rem;
    border-radius: 999px;
    background: rgba(0, 113, 227, 0.08);
    color: var(--text-accent);
  }
}

/* 8. Single Article (single.php) Mobile Perfection */
@media (max-width: 768px) {
  .single-article-pro .post-header-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .post-title-pro {
    font-size: 1.42rem;
    line-height: 1.25;
    letter-spacing: -0.02em;
  }

  .post-meta-pro {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
  }

  .meta-items-group {
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .post-header-actions-pro {
    overflow-x: auto;
    width: 100%;
    padding-bottom: 0.35rem;
    gap: 0.35rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .post-header-actions-pro::-webkit-scrollbar {
    display: none;
  }

  .post-header-actions-pro .pro-act-btn {
    height: 28px;
    padding: 0.25rem 0.6rem;
    font-size: 0.70rem;
    border-radius: 999px;
  }

  .post-content {
    font-size: 0.94rem;
    line-height: 1.62;
  }

  .post-content table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-sm);
  }

  .post-navigation-pro {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .nav-card-empty {
    display: none;
  }
}

/* 9. Single Project Showcase Mobile Polish */
@media (max-width: 680px) {
  .project-app-squircle {
    width: 60px;
    height: 60px;
    border-radius: 14px;
  }

  .project-headline {
    font-size: 1.42rem;
    line-height: 1.25;
  }

  .project-lead-excerpt {
    font-size: 0.88rem;
    line-height: 1.5;
  }

  /* Compact Flexible iOS Action Row Instead of Heavy Full-Width Blocks */
  .project-actions-row {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.45rem;
  }

  .project-btn-primary,
  .project-btn-secondary,
  .project-btn-clone {
    width: auto;
    flex: 1 1 calc(50% - 0.45rem);
    min-height: 34px;
    padding: 0.38rem 0.75rem;
    font-size: 0.76rem;
    border-radius: 999px;
    justify-content: center;
  }

  .project-terminal-window .terminal-body {
    padding: 0.75rem 0.85rem;
    font-size: 0.74rem;
  }

  .project-terminal-window .terminal-line {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* 10. Apple Engineering Dispatch Card Mobile Polish */
@media (max-width: 680px) {
  .newsletter-dispatch-card {
    padding: 1.15rem 1rem;
    border-radius: 16px;
  }

  .dispatch-header {
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 1rem;
  }

  .dispatch-icon-badge {
    width: 34px;
    height: 34px;
  }

  .dispatch-title {
    font-size: 1.15rem;
  }

  .dispatch-subtitle {
    font-size: 0.82rem;
  }

  .dispatch-action-area {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .dispatch-form {
    max-width: 100%;
    width: 100%;
  }

  .dispatch-input-group {
    flex-direction: column;
    align-items: stretch;
    padding: 0.35rem;
    gap: 0.35rem;
    border-radius: 12px;
  }

  .dispatch-input-icon {
    display: none;
  }

  .dispatch-email-input {
    padding: 0.35rem 0.5rem;
    font-size: 0.80rem;
  }

  .dispatch-submit-btn {
    width: 100%;
    justify-content: center;
    padding: 0.42rem 0.85rem;
    font-size: 0.76rem;
    height: 34px;
    border-radius: 999px;
  }

  .dispatch-rss-block {
    width: 100%;
  }

  .dispatch-rss-btn {
    width: 100%;
    justify-content: center;
    padding: 0.42rem 0.85rem;
    font-size: 0.76rem;
    height: 34px;
    border-radius: 999px;
  }

  .dispatch-divider {
    text-align: center;
  }
}

/* 11. Kernel Panic 404 & Search Results Mobile Fit */
@media (max-width: 640px) {
  .panic-terminal-body {
    padding: 1rem 0.85rem;
    font-size: 0.76rem;
  }

  .panic-title {
    font-size: 1.15rem;
  }

  .panic-desc {
    font-size: 0.82rem;
  }

  .panic-actions-group {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: center;
  }

  .panic-btn {
    width: auto;
    flex: 1 1 calc(50% - 0.45rem);
    min-height: 34px;
    padding: 0.38rem 0.75rem;
    font-size: 0.76rem;
    border-radius: 999px;
    justify-content: center;
  }

  .search-query-title {
    font-size: 1.35rem;
  }

  .search-input-pill {
    padding: 0.28rem 0.4rem 0.28rem 0.65rem;
    border-radius: 999px;
  }

  .search-text-input {
    font-size: 0.78rem;
  }

  .search-submit-btn {
    padding: 0.3rem 0.75rem;
    font-size: 0.74rem;
    height: 28px;
    border-radius: 999px;
  }
}


/* ==========================================================================
   Cupertino Engineering Article 3.0 (Ultra Single Experience)
   ========================================================================== */

/* 1. Apple Share Sheet & QR Code Popover */
.share-sheet-wrapper {
  position: relative;
  display: inline-block;
}

.share-sheet-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 290px;
  background: var(--bg-card, rgba(255, 255, 255, 0.9));
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.22), 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 1rem;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.97);
  transform-origin: top right;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.2s;
  pointer-events: none;
}

.share-sheet-popover.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.share-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.65rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.share-popover-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.share-close-btn {
  background: none;
  border: none;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 0 0.2rem;
  transition: color var(--transition-fast);
}

.share-close-btn:hover {
  color: var(--text-primary);
}

.share-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.share-action-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs, 8px);
  color: var(--text-primary);
  font-size: 0.76rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
}

.share-action-item:hover {
  border-color: var(--text-accent, #0071e3);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.share-action-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--bg-secondary);
  color: var(--text-accent, #0071e3);
  flex-shrink: 0;
}

.share-action-icon.icon-apple { color: #0071E3; }
.share-action-icon.icon-qr { color: #34C759; }
.share-action-icon.icon-x { color: var(--text-primary); }
.share-action-icon.icon-in { color: #0A66C2; }

.share-qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm, 10px);
}

.share-qr-canvas-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 140px;
  background: #ffffff;
  padding: 8px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.share-qr-canvas-wrap svg,
.share-qr-canvas-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.share-qr-hint {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  margin-top: 0.5rem;
  text-align: center;
}

.share-quick-copy {
  display: flex;
  flex-direction: column;
}

.btn-copy-mdlink {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs, 8px);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.73rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-copy-mdlink:hover {
  color: var(--text-accent, #0071e3);
  border-color: var(--text-accent, #0071e3);
  background: var(--bg-primary);
}

/* 2. Reader Controls Toggle Pill (Bionic & Ruler) */
.reader-toggle-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 78px;
  height: 28px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 2px 6px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.reader-toggle-pill .pill-knob {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.reader-toggle-pill .pill-label {
  margin-left: auto;
  font-size: 0.68rem;
  color: var(--text-tertiary);
  transition: color 0.2s ease;
}

.reader-toggle-pill.is-active {
  background: var(--text-accent, #0071e3);
  border-color: var(--text-accent, #0071e3);
}

.reader-toggle-pill.is-active .pill-knob {
  transform: translateX(46px);
}

.reader-toggle-pill.is-active .pill-label {
  margin-left: 0;
  margin-right: auto;
  color: #ffffff;
  font-weight: 600;
}

/* 3. Audio Article Bar (Apple Podcasts / Speech Bar) */
.audio-article-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 1rem;
  margin: 0.8rem 0 1.8rem;
  background: var(--bg-card, rgba(255, 255, 255, 0.85));
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md, 14px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  transition: border-color var(--transition-fast);
}

.audio-bar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.audio-play-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--text-accent, #0071e3);
  color: #ffffff;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 113, 227, 0.35);
}

.audio-play-btn:hover {
  transform: scale(1.06);
  background: var(--text-accent-hover, #0077ed);
}

.audio-play-btn:active {
  transform: scale(0.95);
}

.audio-bar-meta {
  display: flex;
  flex-direction: column;
}

.audio-bar-label-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.audio-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-tertiary);
  transition: background 0.3s ease;
}

.audio-pulse-dot.is-pulsing {
  background: #34C759;
  box-shadow: 0 0 8px rgba(52, 199, 89, 0.7);
  animation: audioPulseAnim 1.4s infinite;
}

@keyframes audioPulseAnim {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.65; }
  100% { transform: scale(1); opacity: 1; }
}

.audio-bar-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

.audio-status-sub {
  font-size: 0.72rem;
  color: var(--text-tertiary);
}

.audio-progress-container {
  flex: 1;
  height: 6px;
  background: var(--bg-secondary);
  border-radius: 999px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.audio-progress-bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #0071E3 0%, #34C759 100%);
  border-radius: 999px;
  transition: width 0.15s ease-out;
}

.audio-bar-right {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.audio-speed-btn {
  padding: 0.25rem 0.6rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs, 6px);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.audio-speed-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-color-hover);
}

.audio-stop-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs, 6px);
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.audio-stop-btn:hover {
  color: #FF3B30;
  border-color: #FF3B30;
}

/* Audio Spotlight (Read Aloud Paragraph Glow) */
.audio-active-reading {
  background: rgba(0, 113, 227, 0.08) !important;
  border-left: 3px solid var(--text-accent, #0071e3) !important;
  padding-left: 0.85rem !important;
  border-radius: 6px !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* 4. Xcode Style Code Enhancements */
.code-header-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 0;
  transition: all var(--transition-fast);
}

.code-header-tool-btn:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.05);
  border-color: var(--border-color);
}

[data-theme="dark"] .code-header-tool-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.code-header-tools-group {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.code-wrapped pre {
  white-space: pre-wrap !important;
  word-break: break-word !important;
}

/* 5. Fullscreen Xcode Code Inspector Modal */
.xcode-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.25s;
}

.xcode-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.xcode-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.xcode-modal-window {
  position: relative;
  width: 100%;
  max-width: 960px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  transform: scale(0.96);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.xcode-modal.is-open .xcode-modal-window {
  transform: scale(1);
}

.xcode-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.xcode-modal-title {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.xcode-modal-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs, 6px);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.xcode-modal-btn:hover {
  color: var(--text-accent, #0071e3);
  border-color: var(--text-accent, #0071e3);
}

.xcode-modal-body {
  padding: 1.25rem;
  overflow: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
}

.xcode-modal-body pre {
  margin: 0;
  background: transparent;
  padding: 0;
  border: none;
}

/* 6. macOS Quick Look Lightbox Modal */
.quicklook-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.25s;
}

.quicklook-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.quicklook-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.quicklook-window {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  transform: scale(0.94);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.quicklook-modal.is-open .quicklook-window {
  transform: scale(1);
}

.quicklook-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1.15rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.quicklook-traffic-lights {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ql-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  cursor: pointer;
}

.ql-dot-close { background: #FF5F56; }
.ql-dot-min { background: #FFBD2E; }
.ql-dot-max { background: #27C93F; }

.quicklook-filename {
  font-size: 0.78rem;
  color: var(--text-secondary);
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quicklook-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ql-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.ql-action-btn:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.05);
  border-color: var(--border-color);
}

[data-theme="dark"] .ql-action-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.quicklook-body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow: auto;
  max-height: 75vh;
  background: var(--bg-secondary);
}

.quicklook-img {
  max-width: 100%;
  max-height: 70vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
}

.quicklook-footer {
  padding: 0.65rem 1.15rem;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
}

/* Post Content Image Zoom Cursor */
.post-content img:not(.meta-author-avatar):not(.avatar) {
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-content img:not(.meta-author-avatar):not(.avatar):hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* 7. Mobile Floating TOC Pill & Bottom Sheet */
.mobile-toc-fab {
  position: fixed;
  bottom: 5.5rem;
  right: 1.25rem;
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.15rem;
  background: var(--bg-card, rgba(255, 255, 255, 0.88));
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 600;
  z-index: 999;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-toc-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.mobile-toc-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--text-accent, #0071e3);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
}

/* Universal Floating Sections Button */
.mobile-toc-fab {
  display: none;
}

@media (min-width: 768px) {
  .mobile-toc-sheet {
    bottom: 5.5rem;
    left: auto;
    right: 1.5rem;
    width: 360px;
    max-height: 70vh;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    transform: translateY(20px) scale(0.96);
    opacity: 0;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .mobile-toc-sheet.is-open {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.mobile-toc-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.25s;
}

.mobile-toc-sheet-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.mobile-toc-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 80vh;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-toc-sheet.is-open {
  transform: translateY(0);
}

.mobile-toc-drag-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--border-color);
  margin: 10px auto 4px;
}

.mobile-toc-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.mobile-toc-sheet-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.mobile-toc-close-btn {
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 0.25rem;
}

.mobile-toc-sheet-content {
  padding: 1rem 1.25rem 2.5rem;
  overflow-y: auto;
}

.mobile-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-toc-list li {
  margin-bottom: 0.5rem;
}

.mobile-toc-level-3 {
  padding-left: 1rem;
}

.mobile-toc-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.84rem;
  transition: all var(--transition-fast);
}

.mobile-toc-link:hover,
.mobile-toc-link.is-active {
  background: var(--bg-secondary);
  color: var(--text-accent, #0071e3);
}

.mobile-toc-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-color);
  flex-shrink: 0;
}

.mobile-toc-link.is-active .mobile-toc-dot {
  background: var(--text-accent, #0071e3);
}

/* 8. Bionic Reading & Reading Ruler */
.bionic-fixation {
  font-weight: 700;
  color: var(--text-primary);
}

.reading-ruler {
  position: absolute;
  left: 0;
  right: 0;
  height: 34px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 113, 227, 0.05) 0%, rgba(0, 113, 227, 0.12) 50%, rgba(0, 113, 227, 0.05) 100%);
  border-top: 1px solid rgba(0, 113, 227, 0.25);
  border-bottom: 1px solid rgba(0, 113, 227, 0.25);
  box-shadow: 0 0 16px rgba(0, 113, 227, 0.1);
  border-radius: 4px;
  z-index: 40;
  transition: top 0.05s ease-out;
}

/* 9. Apple Keynote Reactions & Peer Review Card */
.engineering-reactions-card {
  margin: 3rem 0 2rem;
  padding: 1.75rem;
  background: var(--bg-card, rgba(255, 255, 255, 0.85));
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg, 18px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .engineering-reactions-card {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.reactions-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-accent, #0071e3);
  margin-bottom: 0.4rem;
}

.reactions-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
  color: var(--text-primary);
}

.reactions-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin: 0 0 1.25rem;
}

.reactions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}


.reaction-item-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 0.5rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md, 12px);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.reaction-item-btn:hover {
  transform: translateY(-2px);
  border-color: var(--text-accent, #0071e3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.reaction-item-btn:active {
  transform: scale(0.96);
}

.reaction-item-btn.is-reacted {
  border-color: var(--text-accent, #0071e3);
  background: rgba(0, 113, 227, 0.06);
}

.reaction-emoji {
  font-size: 1.6rem;
  margin-bottom: 0.3rem;
  line-height: 1;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reaction-item-btn:hover .reaction-emoji {
  transform: scale(1.18);
}

.reaction-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.2rem;
}

.reaction-count {
  font-size: 0.76rem;
  color: var(--text-tertiary);
  font-weight: 700;
}

.reaction-item-btn.is-reacted .reaction-count {
  color: var(--text-accent, #0071e3);
}

/* Floating Reaction Particle */
.reaction-floating-particle {
  position: absolute;
  pointer-events: none;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-accent, #0071e3);
  animation: floatUpParticle 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  z-index: 100;
}

@keyframes floatUpParticle {
  0% { transform: translateY(0) scale(0.8); opacity: 1; }
  100% { transform: translateY(-40px) scale(1.2); opacity: 0; }
}

.reactions-micro-poll {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
}

.poll-question {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.poll-options {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.poll-vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.8rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs, 6px);
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.poll-vote-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-color-hover);
}

.poll-vote-btn.is-voted {
  background: var(--text-accent, #0071e3);
  color: #ffffff;
  border-color: var(--text-accent, #0071e3);
}

.poll-status {
  font-size: 0.75rem;
  color: #34C759;
}

/* Ultra-Refined iOS 18 Mobile Experience for Reactions & Peer Review */
@media (max-width: 768px) {
  .engineering-reactions-card {
    margin: 1.35rem 0 1.15rem;
    padding: 0.85rem 0.95rem;
    border-radius: 14px;
    background: var(--bg-card);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  }

  [data-theme="dark"] .engineering-reactions-card {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  }

  .reactions-badge {
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 0.15rem;
  }

  .reactions-title {
    font-size: 0.98rem;
    font-weight: 700;
    margin: 0 0 0.2rem;
    letter-spacing: -0.01em;
  }

  .reactions-desc {
    font-size: 0.76rem;
    color: var(--text-tertiary);
    margin: 0 0 0.75rem;
    line-height: 1.35;
  }

  .reactions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.42rem;
    margin-bottom: 0.75rem;
  }

  .reaction-item-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    height: 38px;
    min-height: 38px;
    max-height: 38px;
    padding: 0 0.65rem;
    border-radius: 9px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    box-sizing: border-box;
    transition: transform 0.12s cubic-bezier(0.25, 1, 0.5, 1), background 0.12s ease, border-color 0.12s ease;
  }

  [data-theme="dark"] .reaction-item-btn {
    background: rgba(44, 44, 46, 0.6);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  }

  .reaction-item-btn:hover {
    transform: none;
  }

  .reaction-item-btn:active {
    transform: scale(0.965);
    background: var(--bg-secondary);
  }

  .reaction-item-btn.is-reacted {
    border-color: var(--text-accent, #0071e3);
    background: rgba(0, 113, 227, 0.08);
  }

  .reaction-emoji {
    font-size: 1.15rem;
    margin: 0;
    line-height: 1;
    flex-shrink: 0;
  }

  .reaction-item-btn:hover .reaction-emoji {
    transform: none;
  }

  .reaction-label {
    flex: 1;
    text-align: left;
    margin: 0 0 0 0.45rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .reaction-item-btn.is-reacted .reaction-label {
    color: var(--text-accent, #0071e3);
  }

  .reaction-count {
    flex-shrink: 0;
    font-size: 0.70rem;
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--text-tertiary);
    background: var(--bg-secondary);
    padding: 2px 7px;
    border-radius: 999px;
    margin-left: 0.35rem;
    line-height: 1.2;
    transition: all 0.15s ease;
  }

  .reaction-item-btn.is-reacted .reaction-count {
    background: var(--text-accent, #0071e3);
    color: #ffffff;
  }

  .reactions-micro-poll {
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
    padding-top: 0.65rem;
    margin-top: 0.25rem;
    border-top: 1px solid var(--border-color);
  }

  .poll-question {
    font-size: 0.73rem;
    color: var(--text-tertiary);
    text-align: center;
    margin: 0;
  }

  .poll-options {
    display: flex;
    width: 100%;
    gap: 0.42rem;
  }

  .poll-vote-btn {
    flex: 1;
    height: 32px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.5rem;
    font-size: 0.72rem;
    font-weight: 500;
    border-radius: 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    box-sizing: border-box;
    transition: all 0.12s ease;
  }

  .poll-vote-btn:active {
    transform: scale(0.97);
  }
}

/* ==========================================================================
   Apple Cupertino Social Action Strip (Like / Comment / Share - Visual Match)
   Advanced Cupertino HIG Interaction Engine
   ========================================================================== */
.cupertino-social-bar {
  margin: 2.5rem 0 2rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl, 18px);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 4px 24px -2px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: all var(--transition-normal, 0.25s cubic-bezier(0.16, 1, 0.3, 1));
  user-select: none;
}

[data-theme="dark"] .cupertino-social-bar {
  background: rgba(30, 30, 36, 0.75);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 6px 28px -4px rgba(0, 0, 0, 0.3);
}

.social-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 0.5rem;
  max-width: 580px;
  margin: 0 auto;
}

.social-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.65rem 1.4rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md, 12px);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-tap-highlight-color: transparent;
}

.social-action-btn:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.04);
  transform: translateY(-1px);
}

[data-theme="dark"] .social-action-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

.social-action-btn:active {
  transform: scale(0.96) translateY(0);
}

.social-icon-box {
  position: relative;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.social-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  transition: transform 0.26s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.2s ease;
}

.social-svg.svg-outline {
  opacity: 1;
  transform: scale(1);
}

.social-svg.svg-solid {
  opacity: 0;
  transform: scale(0.5);
  pointer-events: none;
}

/* Hover morph effect matching visual outline -> solid */
.social-action-btn:hover .social-svg.svg-outline {
  opacity: 0.15;
  transform: scale(0.85);
}

.social-action-btn:hover .social-svg.svg-solid {
  opacity: 0.95;
  transform: scale(1);
}

/* Active / Liked State */
.social-btn-like.is-liked {
  color: var(--text-accent, #0071e3);
  background: rgba(0, 113, 227, 0.09);
  border-color: rgba(0, 113, 227, 0.22);
  box-shadow: 0 0 16px -2px rgba(0, 113, 227, 0.22);
}

.social-btn-like.is-liked .social-svg.svg-outline {
  opacity: 0 !important;
  transform: scale(0.3) !important;
}

.social-btn-like.is-liked .social-svg.svg-solid {
  opacity: 1 !important;
  transform: scale(1) !important;
  animation: cupertinoLikeBounce 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes cupertinoLikeBounce {
  0% { transform: scale(1); }
  35% { transform: scale(1.38) rotate(-9deg); }
  65% { transform: scale(0.92) rotate(4deg); }
  85% { transform: scale(1.08) rotate(-1deg); }
  100% { transform: scale(1) rotate(0); }
}

.social-btn-label {
  font-weight: 500;
  letter-spacing: -0.01em;
}

.social-count {
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 999px;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  min-width: 22px;
  text-align: center;
}

[data-theme="dark"] .social-count {
  background: rgba(255, 255, 255, 0.08);
}

.social-btn-like.is-liked .social-count {
  background: var(--text-accent, #0071e3);
  color: #ffffff;
}

.social-bar-sep {
  width: 1px;
  height: 22px;
  background: var(--border-color);
  flex-shrink: 0;
  opacity: 0.7;
}

/* Floating Particle FX on Like */
.cupertino-like-particle {
  position: absolute;
  pointer-events: none;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-accent, #0071e3);
  z-index: 100;
  animation: cupertinoParticleFloat 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cupertinoParticleFloat {
  0% {
    opacity: 1;
    transform: translate(-50%, 0) scale(0.6);
  }
  50% {
    opacity: 1;
    transform: translate(calc(-50% + var(--drift-x, 0px)), -32px) scale(1.2);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--drift-x, 0px)), -58px) scale(0.85);
  }
}

/* Pulse animation on comment focus */
@keyframes cupertinoCommentFocusPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 113, 227, 0.6);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(0, 113, 227, 0.25);
    border-color: var(--text-accent, #0071e3);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 113, 227, 0);
  }
}

#comment.comment-focus-pulse {
  animation: cupertinoCommentFocusPulse 1.2s ease-out 2;
  border-color: var(--text-accent, #0071e3) !important;
}

/* Compact Post Card Social Strip (Home & Archives) */
.card-social-strip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}

.card-social-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.22rem 0.5rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-xs, 6px);
  color: var(--text-tertiary, #86868b);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s ease;
}

.card-social-btn:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .card-social-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

.card-social-btn.is-liked {
  color: var(--text-accent, #0071e3);
}

.card-icon-box {
  position: relative;
  width: 13px;
  height: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.card-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 13px;
  height: 13px;
  transition: all 0.2s ease;
}

.card-svg.svg-outline {
  opacity: 1;
}

.card-svg.svg-solid {
  opacity: 0;
  pointer-events: none;
}

.card-social-btn:hover .card-svg.svg-outline,
.card-social-btn.is-liked .card-svg.svg-outline {
  opacity: 0;
}

.card-social-btn:hover .card-svg.svg-solid,
.card-social-btn.is-liked .card-svg.svg-solid {
  opacity: 1;
}

/* Apple HUD Toast Notification Pill */
.cupertino-social-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  opacity: 0;
  background: rgba(20, 20, 25, 0.88);
  color: #ffffff;
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  z-index: 99999;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.cupertino-social-toast.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

@media (max-width: 640px) {
  .cupertino-social-bar {
    margin: 1.25rem 0 1rem;
    padding: 0.25rem 0.35rem;
    border-radius: 999px;
  }
  .social-action-btn {
    padding: 0.32rem 0.65rem;
    font-size: 0.74rem;
    height: 30px;
    border-radius: 999px;
    gap: 0.32rem;
  }
  .social-icon-box,
  .social-svg {
    width: 15px;
    height: 15px;
  }
  .social-btn-label {
    font-size: 0.70rem;
  }
  .social-count {
    font-size: 0.68rem;
  }
}

/* ==========================================================================
   Cupertino Engineering Dispatch - Real Publishing & Subscriber UI Enhancements
   ========================================================================== */
.dispatch-badge-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}

.dispatch-subscribers-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.6rem;
  background: rgba(48, 209, 88, 0.1);
  border: 1px solid rgba(48, 209, 88, 0.22);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #30d158;
  letter-spacing: -0.01em;
}

[data-theme="dark"] .dispatch-subscribers-pill {
  background: rgba(48, 209, 88, 0.14);
  color: #32d74b;
}

.dispatch-recent-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  padding: 0.85rem 1.25rem 0.65rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.75rem;
  margin-top: 0.5rem;
}

.dispatch-recent-row .recent-label {
  color: var(--text-tertiary, #86868b);
  font-weight: 600;
  font-size: 0.72rem;
}

.recent-topics-scroll {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.dispatch-topic-pill {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.7rem;
  color: var(--text-secondary);
  transition: all 0.18s ease;
}

[data-theme="dark"] .dispatch-topic-pill {
  background: rgba(255, 255, 255, 0.05);
}

.dispatch-topic-pill:hover {
  color: var(--text-primary);
  border-color: var(--border-color-hover);
  transform: translateY(-1px);
}

.spin-icon {
  animation: cupertinoSpin 0.75s linear infinite;
}

@keyframes cupertinoSpin {
  100% { transform: rotate(360deg); }
}

/* ==========================================================================
   Cupertino Article Notice & Ad Banner Engine (Top, Middle, Bottom)
   Apple Human Interface Guidelines & Minimalist Engineering Standard
   ========================================================================== */
.article-banner-wrap {
  width: 100%;
  position: relative;
  box-sizing: border-box;
  clear: both;
}

.article-banner-wrap.banner-pos-top {
  margin: 0.5rem 0 2rem;
}

.article-banner-wrap.banner-pos-middle {
  margin: 2.25rem 0;
}

.article-banner-wrap.banner-pos-bottom {
  margin: 2.25rem 0 1.5rem;
}

/* 1. Apple Pro Notice Card */
.article-banner-card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 1.15rem;
  padding: 1.15rem 1.35rem;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: transform var(--transition-fast, 0.2s ease), box-shadow var(--transition-fast, 0.2s ease), opacity 0.25s ease;
}

.article-banner-card:hover {
  box-shadow: 0 8px 28px -4px rgba(0, 0, 0, 0.07);
}

/* Glass Sweep Animation */
.banner-glass-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  transform: skewX(-20deg);
  pointer-events: none;
  animation: bannerGlassSweep 10s infinite ease-in-out;
}

@keyframes bannerGlassSweep {
  0%, 75% { left: -100%; opacity: 0; }
  85% { opacity: 1; }
  100% { left: 200%; opacity: 0; }
}

/* Dismiss / Close Button */
.banner-close-btn {
  position: absolute;
  top: 8px;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  transition: all 0.18s ease;
  opacity: 0.55;
  z-index: 2;
}

.banner-close-btn:hover {
  opacity: 1;
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .banner-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Icon Squircle & Radar Ping */
.banner-icon-squircle {
  position: relative;
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.banner-icon-squircle svg {
  width: 20px;
  height: 20px;
  position: relative;
  z-index: 1;
}

.banner-icon-ping {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.8;
  animation: bannerPingPulse 2.8s infinite ease-out;
}

@keyframes bannerPingPulse {
  0% { transform: scale(0.9); opacity: 0.9; }
  70% { transform: scale(2.2); opacity: 0; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* Smart Device Visibility Classes */
.banner-device-mobile {
  display: none !important;
}

@media (max-width: 768px) {
  .banner-device-mobile {
    display: block !important;
  }
  .banner-device-desktop {
    display: none !important;
  }
}

/* Content Area */
.banner-content {
  flex: 1;
  min-width: 0;
}

.banner-title {
  font-size: 0.96rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0 0 0.25rem;
  color: var(--text-primary);
  line-height: 1.35;
}

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

.banner-desc p {
  margin: 0;
}

.banner-desc p + p {
  margin-top: 0.4rem;
}

/* Action Button */
.banner-action {
  flex-shrink: 0;
}

.banner-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 1rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}

.banner-action-btn:hover {
  transform: translateY(-1px);
  opacity: 0.92;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
}

.banner-action-btn:active {
  transform: scale(0.96);
}

/* 2. Style Color Themes (Apple Palette) */
/* Blue (Info / System) */
.banner-style-blue {
  background: rgba(0, 113, 227, 0.04);
  border-color: rgba(0, 113, 227, 0.20);
}
.banner-style-blue .banner-icon-squircle {
  background: rgba(0, 113, 227, 0.10);
  color: #0071E3;
  border: 1px solid rgba(0, 113, 227, 0.20);
}
.banner-style-blue .banner-action-btn {
  background: #0071E3;
  color: #ffffff;
}
[data-theme="dark"] .banner-style-blue,
html.dark .banner-style-blue {
  background: rgba(0, 113, 227, 0.08);
  border-color: rgba(0, 113, 227, 0.32);
}

/* Green (Success / Community / Gift) */
.banner-style-green {
  background: rgba(48, 209, 88, 0.04);
  border-color: rgba(48, 209, 88, 0.22);
}
.banner-style-green .banner-icon-squircle {
  background: rgba(48, 209, 88, 0.12);
  color: #30d158;
  border: 1px solid rgba(48, 209, 88, 0.25);
}
.banner-style-green .banner-action-btn {
  background: #30d158;
  color: #ffffff;
}
[data-theme="dark"] .banner-style-green,
html.dark .banner-style-green {
  background: rgba(48, 209, 88, 0.08);
  border-color: rgba(48, 209, 88, 0.32);
}

/* Orange (Warning / Notice / Amber) */
.banner-style-orange {
  background: rgba(255, 159, 10, 0.04);
  border-color: rgba(255, 159, 10, 0.25);
}
.banner-style-orange .banner-icon-squircle {
  background: rgba(255, 159, 10, 0.12);
  color: #ff9f0a;
  border: 1px solid rgba(255, 159, 10, 0.25);
}
.banner-style-orange .banner-action-btn {
  background: #ff9f0a;
  color: #ffffff;
}
[data-theme="dark"] .banner-style-orange,
html.dark .banner-style-orange {
  background: rgba(255, 159, 10, 0.08);
  border-color: rgba(255, 159, 10, 0.32);
}

/* Purple (Pro / Architecture / Code) */
.banner-style-purple {
  background: rgba(175, 82, 222, 0.04);
  border-color: rgba(175, 82, 222, 0.22);
}
.banner-style-purple .banner-icon-squircle {
  background: rgba(175, 82, 222, 0.12);
  color: #af52de;
  border: 1px solid rgba(175, 82, 222, 0.25);
}
.banner-style-purple .banner-action-btn {
  background: #af52de;
  color: #ffffff;
}
[data-theme="dark"] .banner-style-purple,
html.dark .banner-style-purple {
  background: rgba(175, 82, 222, 0.08);
  border-color: rgba(175, 82, 222, 0.32);
}

/* Glass (Minimalist Monochrome) */
.banner-style-glass {
  background: var(--bg-translucent);
  border-color: var(--border-color);
}
.banner-style-glass .banner-icon-squircle {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.banner-style-glass .banner-action-btn {
  background: var(--text-primary);
  color: var(--bg-primary);
}

/* 3. Ad Slot Component */
.article-ad-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.15rem;
  background: var(--bg-secondary);
  border: 1px dashed var(--border-color);
  border-radius: 14px;
  text-align: center;
  transition: border-color var(--transition-fast, 0.2s ease);
}

.article-ad-slot:hover {
  border-color: var(--border-color-hover);
}

.ad-sponsor-badge {
  display: inline-block;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--text-tertiary, #86868b);
  text-transform: uppercase;
  font-weight: 600;
  user-select: none;
}

.ad-code-inner {
  max-width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-code-inner img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* 4. Ultra-Light Mobile Optimization for Article Banners */
@media (max-width: 640px) {
  .article-banner-wrap.banner-pos-top {
    margin: 0.25rem 0 1.35rem;
  }
  .article-banner-wrap.banner-pos-middle {
    margin: 1.5rem 0;
  }
  .article-banner-wrap.banner-pos-bottom {
    margin: 1.5rem 0 1.15rem;
  }

  .article-banner-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 0.95rem;
    border-radius: 14px;
  }

  .banner-icon-squircle {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 9px;
  }

  .banner-icon-squircle svg {
    width: 16px;
    height: 16px;
  }

  .banner-title {
    font-size: 0.88rem;
    margin-bottom: 0.2rem;
  }

  .banner-desc {
    font-size: 0.78rem;
    line-height: 1.45;
  }

  .banner-action {
    width: 100%;
  }

  .banner-action-btn {
    width: 100%;
    justify-content: center;
    height: 34px;
    font-size: 0.76rem;
    padding: 0.35rem 0.75rem;
  }

  .article-ad-slot {
    padding: 0.85rem;
    border-radius: 12px;
  }
}


/* ==========================================================================
   Apple Entry Message Notification (iMessage / iOS / Dynamic Island Dispatcher)
   ========================================================================== */
.cupertino-entry-notif {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 99999;
  max-width: 410px;
  width: calc(100vw - 36px);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-28px) scale(0.95);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease, filter 0.35s ease;
  user-select: none;
}

.cupertino-entry-notif.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.cupertino-entry-notif.is-hiding {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-20px) scale(0.94);
}

/* Card Shell with Glassmorphism */
.entry-notif-card {
  position: relative;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 20px;
  padding: 12px 14px 12px;
  box-shadow: 0 18px 45px -10px rgba(0, 0, 0, 0.18), 0 2px 10px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

[data-theme="dark"] .entry-notif-card,
html.dark .entry-notif-card {
  background: rgba(28, 28, 30, 0.88);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* Specular Light Sheen */
.entry-notif-sheen {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 55%);
  z-index: 1;
}

/* Top App Bar */
.entry-notif-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .entry-notif-topbar,
html.dark .entry-notif-topbar {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.entry-notif-app-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.entry-notif-app-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #34C759;
}

.style-ios_banner .entry-notif-app-icon {
  color: #0071E3;
}

.style-dynamic_island .entry-notif-app-icon {
  color: #FF9F0A;
}

.entry-notif-app-name {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-secondary, #6e6e73);
  text-transform: uppercase;
}

.entry-notif-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.entry-notif-time {
  font-size: 0.68rem;
  color: var(--text-tertiary, #86868b);
}

.entry-notif-btn-dismiss {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-secondary, #6e6e73);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}

[data-theme="dark"] .entry-notif-btn-dismiss,
html.dark .entry-notif-btn-dismiss {
  background: rgba(255, 255, 255, 0.12);
  color: #a1a1a6;
}

.entry-notif-btn-dismiss:hover {
  background: rgba(0, 0, 0, 0.14);
  color: var(--text-primary, #1d1d1f);
  transform: scale(1.08);
}

/* Notification Body */
.entry-notif-content-link {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 12px;
  transition: background 0.15s ease;
}

.entry-notif-content-link:hover {
  text-decoration: none;
}

.entry-notif-body {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 2px 0;
}

.entry-notif-avatar-frame {
  position: relative;
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  overflow: visible;
  background: rgba(0, 113, 227, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.entry-notif-avatar-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.entry-notif-avatar-letter {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0071E3;
}

.entry-notif-online-ping {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #34C759;
  border: 2px solid #ffffff;
  box-shadow: 0 0 6px rgba(52, 199, 89, 0.8);
}

[data-theme="dark"] .entry-notif-online-ping,
html.dark .entry-notif-online-ping {
  border-color: #1c1c1e;
}

.entry-notif-text-wrap {
  flex: 1;
  min-width: 0;
}

.entry-notif-sender {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.entry-notif-sender .sender-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary, #1d1d1f);
}

.entry-notif-sender .sender-badge {
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(0, 113, 227, 0.1);
  color: #0071E3;
}

.entry-notif-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary, #1d1d1f);
  margin: 0 0 3px;
  line-height: 1.32;
}

.entry-notif-excerpt {
  font-size: 0.78rem;
  color: var(--text-secondary, #6e6e73);
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Actions Row */
.entry-notif-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .entry-notif-actions,
html.dark .entry-notif-actions {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.entry-notif-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
}

.entry-notif-action-btn.btn-snooze {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-secondary, #6e6e73);
}

[data-theme="dark"] .entry-notif-action-btn.btn-snooze,
html.dark .entry-notif-action-btn.btn-snooze {
  background: rgba(255, 255, 255, 0.1);
  color: #a1a1a6;
}

.entry-notif-action-btn.btn-snooze:hover {
  background: rgba(0, 0, 0, 0.09);
  color: var(--text-primary, #1d1d1f);
}

.entry-notif-action-btn.btn-read {
  background: #0071E3;
  color: #ffffff;
}

.entry-notif-action-btn.btn-read:hover {
  background: #0077ED;
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.35);
  transform: translateY(-1px);
}

/* Style Variant: Dynamic Island */
.cupertino-entry-notif.style-dynamic_island {
  top: 14px;
  right: 50%;
  transform: translateX(50%) translateY(-36px) scale(0.85);
  max-width: 440px;
}

.cupertino-entry-notif.style-dynamic_island.is-visible {
  transform: translateX(50%) translateY(0) scale(1);
}

.cupertino-entry-notif.style-dynamic_island.is-hiding {
  transform: translateX(50%) translateY(-24px) scale(0.9);
}

.cupertino-entry-notif.style-dynamic_island .entry-notif-card {
  background: #000000;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}

.cupertino-entry-notif.style-dynamic_island .entry-notif-title,
.cupertino-entry-notif.style-dynamic_island .sender-name {
  color: #ffffff;
}

.cupertino-entry-notif.style-dynamic_island .entry-notif-excerpt,
.cupertino-entry-notif.style-dynamic_island .entry-notif-app-name {
  color: rgba(255, 255, 255, 0.7);
}

.cupertino-entry-notif.style-dynamic_island .entry-notif-btn-dismiss {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* Touch Swipe Handle for Mobile */
.entry-notif-swipe-bar {
  display: none;
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.18);
  margin: 8px auto 0;
}

[data-theme="dark"] .entry-notif-swipe-bar,
html.dark .entry-notif-swipe-bar {
  background: rgba(255, 255, 255, 0.22);
}

/* Mobile Responsive Optimization */
@media (max-width: 640px) {
  .cupertino-entry-notif {
    top: 10px;
    left: 12px;
    right: 12px;
    width: auto;
    max-width: 100%;
    transform: translateY(-35px) scale(0.95);
  }

  .cupertino-entry-notif.style-dynamic_island {
    top: 10px;
    left: 12px;
    right: 12px;
    transform: translateY(-35px) scale(0.95);
  }

  .cupertino-entry-notif.style-dynamic_island.is-visible {
    transform: translateY(0) scale(1);
  }

  .entry-notif-card {
    padding: 10px 12px;
    border-radius: 18px;
  }

  .entry-notif-avatar-frame {
    width: 38px;
    height: 38px;
    min-width: 38px;
  }

  .entry-notif-avatar-img {
    width: 38px;
    height: 38px;
  }

  .entry-notif-title {
    font-size: 0.86rem;
  }

  .entry-notif-excerpt {
    font-size: 0.74rem;
  }

  .entry-notif-swipe-bar {
    display: block;
  }
}


/* ==========================================================================
   Apple Entry Notification Ultra Additions (iOS 18 Stacking & QuickLook)
   ========================================================================== */
/* Multi-Card Ghost Stack Layers */
.cupertino-entry-notif.has-stack {
  perspective: 1000px;
}

.entry-notif-stack-layer {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 100%;
  border-radius: 20px;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  z-index: -1;
}

.entry-notif-stack-layer.stack-layer-1 {
  top: -6px;
  transform: scale(0.97);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.entry-notif-stack-layer.stack-layer-2 {
  top: -12px;
  transform: scale(0.94);
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .entry-notif-stack-layer.stack-layer-1,
html.dark .entry-notif-stack-layer.stack-layer-1 {
  background: rgba(38, 38, 42, 0.7);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .entry-notif-stack-layer.stack-layer-2,
html.dark .entry-notif-stack-layer.stack-layer-2 {
  background: rgba(45, 45, 50, 0.45);
  border-color: rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* Hover reveal effect for stack */
.cupertino-entry-notif.has-stack:hover .stack-layer-1 {
  transform: translateY(-4px) scale(0.98);
}
.cupertino-entry-notif.has-stack:hover .stack-layer-2 {
  transform: translateY(-8px) scale(0.95);
}

.entry-notif-stack-badge {
  font-size: 0.62rem;
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-secondary, #6e6e73);
  padding: 1px 6px;
  border-radius: 999px;
  font-weight: 600;
}

[data-theme="dark"] .entry-notif-stack-badge,
html.dark .entry-notif-stack-badge {
  background: rgba(255, 255, 255, 0.12);
  color: #a1a1a6;
}

/* Category Badge in Sender Line */
.entry-notif-sender .sender-cat {
  font-size: 0.62rem;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(52, 199, 89, 0.12);
  color: #34C759;
}

/* Navigation Dots for Carousel */
.entry-notif-nav-dots {
  display: flex;
  align-items: center;
  gap: 5px;
}

.entry-notif-nav-dots .nav-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.15);
  cursor: pointer;
  padding: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] .entry-notif-nav-dots .nav-dot,
html.dark .entry-notif-nav-dots .nav-dot {
  background: rgba(255, 255, 255, 0.2);
}

.entry-notif-nav-dots .nav-dot.is-active {
  width: 14px;
  border-radius: 4px;
  background: #0071E3;
}

.entry-notif-btn-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* QuickLook Action Button */
.entry-notif-action-btn.btn-quicklook {
  background: rgba(0, 113, 227, 0.1);
  color: #0071E3;
}

.entry-notif-action-btn.btn-quicklook:hover {
  background: rgba(0, 113, 227, 0.18);
  transform: translateY(-1px);
}

/* QuickLook Peek Modal Sheet */
.entry-notif-quicklook-sheet {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(32px) saturate(190%);
  -webkit-backdrop-filter: blur(32px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.25);
  z-index: 100;
  animation: quickLookSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] .entry-notif-quicklook-sheet,
html.dark .entry-notif-quicklook-sheet {
  background: rgba(30, 30, 34, 0.96);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.7);
}

.entry-notif-quicklook-sheet.is-open {
  display: block;
}

@keyframes quickLookSlideIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.quicklook-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.quicklook-badge {
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  color: #0071E3;
  font-weight: 600;
}

.quicklook-close-btn {
  background: none;
  border: none;
  font-size: 0.75rem;
  color: var(--text-secondary, #6e6e73);
  cursor: pointer;
  padding: 2px 4px;
}

.quicklook-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-primary, #1d1d1f);
  margin: 0 0 6px;
  line-height: 1.35;
}

.quicklook-desc {
  font-size: 0.82rem;
  line-height: 1.48;
  color: var(--text-secondary, #6e6e73);
  margin: 0 0 10px;
}

.quicklook-footer {
  text-align: right;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding-top: 8px;
}

[data-theme="dark"] .quicklook-footer,
html.dark .quicklook-footer {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.quicklook-read-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: #0071E3;
  text-decoration: none;
}

.quicklook-read-link:hover {
  text-decoration: underline;
}


/* ==========================================================================
   APPLE HIG NEXT-GEN ULTRA COMPACT MOBILE SYSTEM (ALL AREAS ENHANCED)
   Unified, lightweight, native iOS 18 app ergonomics for <= 768px viewports
   ========================================================================== */
@media (max-width: 768px) {
  /* 1. Header, Hero & Cover Frame */
  .post-header-pro,
  .post-header {
    margin-bottom: 1.15rem !important;
  }

  .post-header-top {
    margin-bottom: 0.65rem !important;
    gap: 0.45rem !important;
  }

  .post-breadcrumb {
    font-size: 0.72rem !important;
    gap: 0.35rem !important;
  }

  .post-ref-badge {
    font-size: 0.66rem !important;
    padding: 0.18rem 0.45rem !important;
  }

  .post-title-pro {
    font-size: 1.42rem !important;
    line-height: 1.28 !important;
    letter-spacing: -0.02em !important;
    margin-bottom: 0.65rem !important;
  }

  .post-meta-pro {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.65rem !important;
    margin-bottom: 0.65rem !important;
  }

  .meta-author-chip {
    gap: 0.5rem !important;
  }

  .meta-author-avatar {
    width: 28px !important;
    height: 28px !important;
  }

  .author-chip-name {
    font-size: 0.82rem !important;
  }

  .author-chip-role {
    font-size: 0.68rem !important;
  }

  .meta-items-group {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.35rem !important;
    width: 100% !important;
  }

  .meta-item-pill {
    padding: 0.18rem 0.5rem !important;
    font-size: 0.68rem !important;
    gap: 0.3rem !important;
  }

  .post-tags-pro {
    margin: 0.65rem 0 0.85rem !important;
    gap: 0.3rem !important;
  }

  .tag-pill-pro {
    font-size: 0.68rem !important;
    padding: 0.15rem 0.45rem !important;
  }

  .post-cover-wrapper {
    margin: 0.75rem 0 1.25rem !important;
  }

  .post-cover-frame {
    border-radius: 14px !important;
  }

  .post-cover-img {
    max-height: 220px !important;
    height: 200px !important;
    width: 100% !important;
    object-fit: cover !important;
  }

  /* 2. Apple Podcasts Compact Speech Audio Bar */
  .audio-article-bar {
    padding: 0.5rem 0.75rem !important;
    margin: 0.75rem 0 1.15rem !important;
    border-radius: 12px !important;
    gap: 0.5rem !important;
  }

  .audio-bar-left {
    gap: 0.5rem !important;
  }

  .audio-play-btn {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
  }

  .audio-play-btn svg {
    width: 12px !important;
    height: 12px !important;
  }

  .audio-bar-title {
    font-size: 0.74rem !important;
  }

  .audio-status-sub {
    font-size: 0.66rem !important;
  }

  .audio-progress-container {
    height: 4px !important;
  }

  .audio-bar-right {
    gap: 0.3rem !important;
  }

  .audio-speed-btn {
    padding: 0.15rem 0.45rem !important;
    font-size: 0.66rem !important;
    height: 26px !important;
    border-radius: 6px !important;
  }

  .audio-stop-btn {
    width: 24px !important;
    height: 24px !important;
    border-radius: 6px !important;
  }

  /* 3. Article Content Typography & Vertical Rhythm */
  .post-content {
    font-size: 0.94rem !important;
    line-height: 1.62 !important;
  }

  .post-content > p:first-of-type {
    font-size: 1.02rem !important;
    line-height: 1.62 !important;
    margin-bottom: 0.95rem !important;
  }

  .post-content p {
    margin-bottom: 0.95rem !important;
  }

  .post-content h2,
  .post-content .wp-block-heading:is(h2),
  h2.wp-block-heading {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    line-height: 1.32 !important;
    margin: 1.65rem 0 0.65rem !important;
    letter-spacing: -0.015em !important;
    padding-bottom: 0.45rem !important;
    scroll-margin-top: calc(56px + 16px) !important;
  }

  .post-content h2::before,
  .post-content .wp-block-heading:is(h2)::before {
    left: -0.65rem !important;
    width: 3px !important;
    bottom: calc(0.45rem + 0.22em) !important;
  }

  .post-content h3,
  .post-content .wp-block-heading:is(h3),
  h3.wp-block-heading {
    font-size: 1.08rem !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    margin: 1.35rem 0 0.55rem !important;
    scroll-margin-top: calc(56px + 16px) !important;
  }

  .post-content h4,
  .post-content .wp-block-heading:is(h4),
  h4.wp-block-heading {
    font-size: 0.96rem !important;
    font-weight: 600 !important;
    margin: 1.15rem 0 0.45rem !important;
    scroll-margin-top: calc(56px + 16px) !important;
  }

  .heading-anchor {
    opacity: 0.5 !important;
    transform: translateX(0) !important;
    width: 22px !important;
    height: 22px !important;
  }

  .heading-anchor svg {
    width: 13px !important;
    height: 13px !important;
  }

  .post-content blockquote {
    margin: 1rem 0 !important;
    padding: 0.55rem 0.85rem !important;
    font-size: 0.88rem !important;
    border-left-width: 3px !important;
  }

  .code-block-wrapper {
    margin: 1.15rem 0 !important;
    border-radius: 12px !important;
  }

  .post-content pre {
    padding: 0.75rem 0.75rem !important;
    font-size: 0.78rem !important;
  }

  .post-content ul,
  .post-content ol {
    margin-bottom: 0.95rem !important;
    padding-left: 1.25rem !important;
  }

  .post-content li {
    margin-bottom: 0.3rem !important;
  }

  /* 4. Compact Author Profile Card */
  .author-card-pro {
    margin: 1.5rem 0 1.15rem !important;
    padding: 0.85rem 0.95rem !important;
    border-radius: 14px !important;
  }

  .author-card-inner {
    grid-template-columns: 46px 1fr !important;
    column-gap: 0.75rem !important;
    row-gap: 0.35rem !important;
  }

  .author-avatar-frame,
  .avatar-frame-pro {
    width: 46px !important;
    height: 46px !important;
    border-radius: 12px !important;
  }

  .author-name {
    font-size: 0.96rem !important;
  }

  .author-role-tag {
    font-size: 0.68rem !important;
  }

  .author-location {
    font-size: 0.68rem !important;
  }

  .author-bio-text {
    font-size: 0.78rem !important;
    line-height: 1.45 !important;
    margin: 0.35rem 0 0.55rem !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  .author-toolbar {
    margin-top: 0.35rem !important;
    gap: 0.35rem !important;
  }

  .author-chip {
    padding: 0.18rem 0.45rem !important;
    font-size: 0.67rem !important;
    height: 25px !important;
  }

  .author-social-link {
    width: 25px !important;
    height: 25px !important;
    font-size: 0.72rem !important;
  }

  /* 5. Related Posts Swipe Track (Apple Horizontal Carousel) */
  .related-posts-pro {
    margin: 1.5rem 0 1.15rem !important;
    padding-top: 1.15rem !important;
  }

  .related-posts-header {
    margin-bottom: 0.75rem !important;
  }

  .related-section-title {
    font-size: 0.96rem !important;
  }

  .related-section-count {
    font-size: 0.66rem !important;
  }

  .related-posts-grid {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-snap-type: x mandatory !important;
    gap: 0.6rem !important;
    padding-bottom: 0.5rem !important;
    margin: 0 -0.85rem !important;
    padding-left: 0.85rem !important;
    padding-right: 0.85rem !important;
  }

  .related-card {
    flex: 0 0 230px !important;
    width: 230px !important;
    max-width: 230px !important;
    scroll-snap-align: start !important;
    border-radius: 12px !important;
  }

  .related-card-link {
    padding: 0.75rem 0.85rem !important;
  }

  .related-card-top {
    margin-bottom: 0.45rem !important;
  }

  .related-cat-tag {
    font-size: 0.68rem !important;
  }

  .related-read-time {
    font-size: 0.66rem !important;
  }

  .related-card-title {
    font-size: 0.84rem !important;
    line-height: 1.3 !important;
    margin-bottom: 0.35rem !important;
    -webkit-line-clamp: 2 !important;
  }

  .related-card-excerpt {
    display: none !important;
  }

  .related-card-footer {
    padding-top: 0.4rem !important;
    font-size: 0.66rem !important;
  }

  /* 6. Post Navigation (iOS Split Navigation Bar) */
  .post-navigation-pro,
  .post-navigation {
    margin: 1.35rem 0 1.15rem !important;
    padding-top: 1.15rem !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.45rem !important;
  }

  .post-navigation-pro .post-nav-card,
  .post-navigation .post-nav-card {
    padding: 0.55rem 0.75rem !important;
    border-radius: 10px !important;
    min-height: 52px !important;
    justify-content: center !important;
  }

  .nav-card-sub,
  .post-nav-label {
    font-size: 0.64rem !important;
    margin-bottom: 0.15rem !important;
  }

  .post-navigation-pro .next-card {
    text-align: right !important;
    align-items: flex-end !important;
  }

  .post-nav-card .nav-card-title,
  .post-nav-card h4 {
    font-size: 0.74rem !important;
    line-height: 1.25 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  /* 7. Newsletter & RSS Dispatch Card */
  .newsletter-dispatch-section {
    margin: 1.5rem 0 1.15rem !important;
  }

  .newsletter-dispatch-card {
    padding: 0.95rem 1rem !important;
    border-radius: 14px !important;
  }

  .dispatch-header {
    gap: 0.55rem !important;
    margin-bottom: 0.75rem !important;
    flex-direction: row !important;
    align-items: center !important;
  }

  .dispatch-icon-badge {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    border-radius: 8px !important;
  }

  .dispatch-icon-badge svg {
    width: 15px !important;
    height: 15px !important;
  }

  .dispatch-title {
    font-size: 0.96rem !important;
    margin: 0 0 0.15rem !important;
  }

  .dispatch-subtitle {
    font-size: 0.73rem !important;
    line-height: 1.35 !important;
  }

  .dispatch-action-area {
    gap: 0.45rem !important;
  }

  .dispatch-input-group {
    flex-direction: row !important;
    padding: 2px !important;
    border-radius: 999px !important;
  }

  .dispatch-email-input {
    height: 34px !important;
    font-size: 0.74rem !important;
    padding: 0 0.65rem !important;
  }

  .dispatch-submit-btn {
    height: 34px !important;
    padding: 0 0.85rem !important;
    font-size: 0.72rem !important;
    width: auto !important;
  }

  .dispatch-divider {
    display: none !important;
  }

  .dispatch-rss-btn {
    height: 32px !important;
    font-size: 0.72rem !important;
    border-radius: 8px !important;
  }

  .dispatch-recent-row {
    margin-top: 0.5rem !important;
    padding-top: 0.5rem !important;
    font-size: 0.67rem !important;
  }

  .dispatch-footer {
    margin-top: 0.5rem !important;
    font-size: 0.65rem !important;
  }

  /* 8. Comments & Reply Form */
  .post-comments-area {
    margin-top: 1.5rem !important;
    padding-top: 1.35rem !important;
  }

  .comments-platform-switcher {
    margin-bottom: 1.15rem !important;
    padding: 2px !important;
  }

  .comment-respond {
    padding: 0.95rem 1rem !important;
    border-radius: 14px !important;
    margin-top: 1rem !important;
  }

  .comment-reply-title {
    font-size: 0.96rem !important;
    margin-bottom: 0.65rem !important;
  }

  .comment-form p {
    margin-bottom: 0.55rem !important;
  }

  .comment-form input[type="text"],
  .comment-form input[type="email"],
  .comment-form input[type="url"] {
    height: 35px !important;
    font-size: 0.78rem !important;
    padding: 0 0.65rem !important;
    border-radius: 8px !important;
  }

  .comment-form textarea {
    padding: 0.55rem 0.65rem !important;
    font-size: 0.78rem !important;
    min-height: 75px !important;
    border-radius: 8px !important;
  }

  .comment-form .submit {
    height: 35px !important;
    padding: 0 1rem !important;
    font-size: 0.74rem !important;
    border-radius: 8px !important;
  }

  /* 9. Archive & Blog Card Polish */
  .post-card-pro {
    border-radius: 14px !important;
  }

  .card-full-content {
    padding: 0.85rem 0.95rem !important;
  }

  .card-title-pro {
    font-size: 0.95rem !important;
    line-height: 1.3 !important;
    margin-bottom: 0.35rem !important;
  }

  .card-excerpt-pro {
    font-size: 0.78rem !important;
    line-height: 1.42 !important;
    margin-bottom: 0.55rem !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  .card-bottom-bar {
    padding-top: 0.55rem !important;
    margin-top: 0.55rem !important;
  }

  /* 10. Footer & Safe Area */
  .site-footer {
    padding: 1.35rem 0 calc(70px + env(safe-area-inset-bottom, 0px)) !important;
    font-size: 0.75rem !important;
  }

  .footer-inner {
    gap: 0.65rem !important;
  }
}
