/* niche-knack apps - Brand Stylesheet */
/* Precision Instruments for Niche Problems */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&family=Lora:ital,wght@0,400;0,600;1,400&display=swap');

/* CSS Variables - Evolved Workshop Palette */
:root {
  /* Core — Deep Forest Green lineage */
  --deep-green: #0D1F17;
  --workshop: #152A20;
  --patina: #1E3A2B;

  /* Brass/Gold — the craft accent */
  --brass: #C4973B;
  --lantern: #E8B84D;

  /* Signal Teal — research/technical accent */
  --signal-teal: #3EBFAD;
  --signal-glow: #6ED4C6;

  /* Text */
  --chalk: #E4E8E6;
  --mist: #8A9690;

  /* Supporting */
  --slate: #3A4A44;
  --ink: #0A1610;

  /* Per-app accent spectrum */
  --spectrum-indigo: #6E7FF5;
  --spectrum-emerald: #4AE0A0;
  --spectrum-violet: #A87FE5;
  --spectrum-slate: #5A8FA8;
  --spectrum-amber: #D4A84B;
  --spectrum-coral: #F5896E;

  /* Typography */
  --font-primary: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Lora', Georgia, serif;
  --font-mono: 'IBM Plex Mono', 'JetBrains Mono', monospace;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 4rem;

  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background-color: var(--deep-green);
  color: var(--chalk);
  line-height: 1.65;
  min-height: 100vh;
}

/* Typography */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
}

h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: 600;
  line-height: 1.3;
}

h1 {
  font-size: 2.75rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.35rem;
}

h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

p {
  margin-bottom: var(--space-md);
}

a {
  color: var(--signal-teal);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--signal-glow);
}

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

/* Header */
.site-header {
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--slate);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.logo-group {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.wordmark {
  display: flex;
  flex-direction: column;
}

.wordmark-primary {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--chalk);
  letter-spacing: -0.01em;
}

.wordmark-secondary {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--signal-teal);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Navigation */
.main-nav ul {
  display: flex;
  list-style: none;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.main-nav a {
  font-family: var(--font-primary);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--mist);
  padding: var(--space-sm) 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--chalk);
  border-bottom-color: var(--signal-teal);
}

/* Hero Section */
.hero {
  padding: var(--space-xl) 0;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
  min-height: 60vh;
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--signal-teal);
  margin-bottom: var(--space-md);
  display: inline-block;
}

.hero-logo {
  width: 200px;
  height: 200px;
  margin-bottom: var(--space-lg);
}

.hero h1 {
  margin-bottom: var(--space-sm);
}

.hero .tagline {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--brass);
  font-style: italic;
  margin-bottom: var(--space-lg);
}

.hero-description {
  max-width: 600px;
  font-size: 1.1rem;
  color: var(--mist);
  margin-bottom: var(--space-lg);
}

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.text-teal {
  color: var(--signal-teal);
}

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 10px 24px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--signal-teal);
  color: var(--deep-green);
  border-color: var(--signal-teal);
}

.btn-primary:hover {
  background-color: var(--signal-glow);
  border-color: var(--signal-glow);
  color: var(--deep-green);
}

.btn-secondary {
  background-color: transparent;
  color: var(--chalk);
  border-color: var(--slate);
}

.btn-secondary:hover {
  border-color: var(--brass);
  color: var(--brass);
}

.btn-group {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* Sections */
.section {
  padding: var(--space-xl) 0;
}

.section-alt {
  background-color: var(--workshop);
}

.section-emphasis {
  background: linear-gradient(180deg,
    var(--deep-green) 0%,
    rgba(62, 191, 173, 0.03) 50%,
    var(--deep-green) 100%
  );
}

/* section-light: warm muted treatment for contrast sections */
.section-light {
  background-color: var(--patina);
  color: var(--chalk);
}

.section-light h2,
.section-light h3 {
  color: var(--lantern);
}

.section-light a {
  color: var(--signal-teal);
}

.section-light a:hover {
  color: var(--signal-glow);
}

.section-title {
  text-align: center;
  margin-bottom: var(--space-lg);
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background-color: var(--brass);
  margin: var(--space-md) auto 0;
}

.section-light .section-title::after {
  background-color: var(--lantern);
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
}

/* App Card */
.app-card {
  background: rgba(21, 42, 32, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(196, 151, 59, 0.15);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: visible;
}

.app-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brass), transparent);
  opacity: 0.4;
  transition: opacity 0.2s ease;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.app-card:hover {
  border-color: rgba(196, 151, 59, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.app-card:hover::before {
  opacity: 1;
}

.section-light .app-card {
  background: rgba(13, 31, 23, 0.5);
  border-color: rgba(196, 151, 59, 0.2);
}

.section-light .app-card h3 {
  color: var(--lantern);
}

.app-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.app-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
}

.app-card-status {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--mist);
}

.status-released::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--spectrum-emerald);
  margin-right: 4px;
  vertical-align: middle;
}

.app-card h3 {
  margin-bottom: var(--space-sm);
  color: var(--lantern);
}

.app-card h3 a {
  color: inherit;
  text-decoration: none;
}

.app-card h3 a:hover {
  color: var(--signal-glow);
}

.app-card p {
  font-size: 0.95rem;
  color: var(--mist);
}

.app-card-accent {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: var(--space-sm);
}

.accent-indigo { background-color: var(--spectrum-indigo); }
.accent-green { background-color: var(--spectrum-emerald); }
.accent-amethyst { background-color: var(--spectrum-violet); }
.accent-slate { background-color: var(--spectrum-slate); }

/* Download Section */
.download-options {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: center;
  margin-top: var(--space-lg);
}

.download-btn {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  background-color: rgba(21, 42, 32, 0.8);
  border: 1px solid var(--slate);
  border-radius: var(--radius-md);
  color: var(--chalk);
  transition: all 0.2s ease;
}

.download-btn:hover {
  border-color: var(--signal-teal);
  color: var(--signal-teal);
}

.download-btn svg {
  width: 24px;
  height: 24px;
}

/* V4V / Support Section */
.v4v-section {
  text-align: center;
}

.v4v-intro {
  max-width: 700px;
  margin: 0 auto var(--space-xl);
  font-size: 1.1rem;
}

.v4v-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
  max-width: 900px;
  margin: 0 auto;
}

.v4v-card {
  background: rgba(21, 42, 32, 0.8);
  border: 1px solid rgba(196, 151, 59, 0.15);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
}

.v4v-card h3 {
  color: var(--lantern);
  margin-bottom: var(--space-md);
}

.v4v-card p {
  font-size: 0.9rem;
  margin-bottom: var(--space-md);
}

.v4v-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--slate);
  padding: var(--space-lg) 0;
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.footer-nav {
  display: flex;
  gap: var(--space-lg);
  flex-wrap: wrap;
  justify-content: center;
}

.footer-nav a {
  font-family: var(--font-primary);
  font-size: 0.85rem;
  color: var(--mist);
}

.footer-nav a:hover {
  color: var(--signal-teal);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--mist);
  opacity: 0.6;
}

/* About Page */
.about-content {
  max-width: 800px;
  margin: 0 auto;
}

.about-content p {
  font-size: 1.1rem;
  margin-bottom: var(--space-lg);
}

/* Bio Section */
.bio-section {
  display: flex;
  gap: var(--space-xl);
  align-items: flex-start;
  max-width: 900px;
  margin: 0 auto;
}

.bio-avatar-wrapper {
  flex-shrink: 0;
}

.bio-avatar {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--brass);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.bio-content h3 {
  font-size: 1.75rem;
  margin-bottom: var(--space-lg);
  color: var(--lantern);
}

.bio-content p {
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: var(--space-md);
}

.philosophy-list {
  list-style: none;
  margin: var(--space-lg) 0;
}

.philosophy-list li {
  padding: var(--space-md) 0;
  border-bottom: 1px solid rgba(196, 151, 59, 0.2);
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
}

.philosophy-list li::before {
  content: '';
  width: 8px;
  height: 8px;
  background-color: var(--signal-teal);
  border-radius: 50%;
  margin-top: 0.5rem;
  flex-shrink: 0;
}

/* App Detail Page */
.app-hero {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  padding: var(--space-xl) 0;
  flex-wrap: wrap;
}

.app-hero-icon {
  width: 150px;
  height: 150px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--brass);
}

.app-hero-content {
  flex: 1;
  min-width: 300px;
}

.app-hero h1 {
  margin-bottom: var(--space-sm);
}

.app-hero .tagline {
  font-family: var(--font-display);
  color: var(--brass);
  font-style: italic;
  font-size: 1.1rem;
  margin-bottom: var(--space-md);
}

.app-platforms {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.platform-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  padding: 3px 8px;
  background: rgba(62, 191, 173, 0.1);
  border: 1px solid rgba(62, 191, 173, 0.2);
  border-radius: var(--radius-sm);
  color: var(--signal-teal);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.platform-badge:hover {
  background: rgba(62, 191, 173, 0.2);
  border-color: rgba(62, 191, 173, 0.4);
  color: var(--signal-glow);
}

.platform-badge.disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.platform-badge .platform-icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.version-tag {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--brass);
  opacity: 0.7;
}

/* Platform download dropdown (uses <details>/<summary>) */
.platform-dropdown-wrap {
  position: relative;
  display: inline-block;
}

.platform-dropdown-wrap > summary {
  list-style: none;
}

.platform-dropdown-wrap > summary::-webkit-details-marker {
  display: none;
}

.platform-dropdown-wrap > summary.platform-badge::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-top: 4px solid currentColor;
  margin-left: 2px;
  transition: transform 0.15s ease;
}

.platform-dropdown-wrap[open] > summary.platform-badge::after {
  transform: rotate(180deg);
}

.app-card:has(.platform-dropdown-wrap[open]) {
  z-index: 10;
}

.platform-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 160px;
  background: var(--workshop);
  border: 1px solid rgba(62, 191, 173, 0.25);
  border-radius: var(--radius-sm);
  padding: 4px 0;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.platform-dropdown a {
  display: block;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--chalk);
  text-decoration: none;
  transition: background 0.1s ease;
}

.platform-dropdown a:hover {
  background: rgba(62, 191, 173, 0.15);
  color: var(--signal-glow);
}

.features-list {
  list-style: none;
}

.features-list li {
  padding: var(--space-sm) 0;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.features-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  background-color: var(--signal-teal);
  border-radius: 50%;
}

/* Screenshots */
.screenshots {
  display: flex;
  gap: var(--space-md);
  overflow-x: auto;
  padding: var(--space-md) 0;
}

.screenshot {
  flex-shrink: 0;
  max-width: 300px;
  border-radius: var(--radius-md);
  border: 1px solid var(--slate);
}

/* QR Code wrapper */
.qr-wrapper {
  background: white;
  padding: 12px;
  border-radius: var(--radius-md);
  display: inline-block;
}

/* Responsive */
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }

  .header-content {
    flex-direction: column;
    text-align: center;
  }

  .logo-group {
    flex-direction: column;
  }

  .main-nav ul {
    justify-content: center;
  }

  .hero-layout {
    grid-template-columns: 1fr;
    min-height: auto;
    text-align: center;
  }

  .hero-visual {
    display: none;
  }

  .hero-logo {
    width: 150px;
    height: 150px;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }

  .app-hero {
    flex-direction: column;
    text-align: center;
  }

  .app-hero-content {
    text-align: center;
  }

  .app-platforms {
    justify-content: center;
  }

  .bio-section {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .bio-avatar {
    width: 160px;
    height: 160px;
  }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-brass { color: var(--brass); }
.text-glow { color: var(--lantern); }
.text-teal { color: var(--signal-teal); }
.mt-lg { margin-top: var(--space-lg); }
.mb-lg { margin-bottom: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-xl { margin-bottom: var(--space-xl); }

/* Code styling */
code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background-color: rgba(0, 0, 0, 0.3);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(62, 191, 173, 0.2);
}

.section-light code {
  background-color: rgba(0, 0, 0, 0.2);
  border-color: rgba(196, 151, 59, 0.2);
}

/* Button focus states */
.btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(62, 191, 173, 0.4);
}

.btn:active {
  transform: translateY(1px);
}

/* Page load animation */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

main {
  animation: slideUp 0.3s ease-out;
}

/* Card stagger animation */
.app-card {
  opacity: 0;
  animation: slideUp 0.4s ease-out forwards;
}

.app-card:nth-child(1) { animation-delay: 0.05s; }
.app-card:nth-child(2) { animation-delay: 0.1s; }
.app-card:nth-child(3) { animation-delay: 0.15s; }
.app-card:nth-child(4) { animation-delay: 0.2s; }
.app-card:nth-child(5) { animation-delay: 0.25s; }
.app-card:nth-child(6) { animation-delay: 0.3s; }

/* Selection styling */
::selection {
  background-color: var(--signal-teal);
  color: var(--deep-green);
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--deep-green);
}

::-webkit-scrollbar-thumb {
  background: var(--slate);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--brass);
}

/* Content link underlines */
.about-content a,
.v4v-intro a {
  text-decoration: underline;
  text-decoration-color: rgba(62, 191, 173, 0.4);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.2s ease;
}

.about-content a:hover,
.v4v-intro a:hover {
  text-decoration-color: var(--signal-teal);
}

.section-light .about-content a {
  text-decoration-color: rgba(62, 191, 173, 0.4);
}

.section-light .about-content a:hover {
  text-decoration-color: var(--signal-teal);
}

/* =============================================
   Engineer's Log Styles
   ============================================= */

/* Log Header */
.log-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.log-header .tagline {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--brass);
  font-style: italic;
  margin-top: var(--space-sm);
}

/* Log Listing */
.log-listing {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

/* Log Card */
.log-card {
  background: rgba(21, 42, 32, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(196, 151, 59, 0.15);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
  opacity: 0;
  animation: slideUp 0.4s ease-out forwards;
}

.log-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brass), transparent);
  opacity: 0.4;
  transition: opacity 0.2s ease;
}

.log-card:hover {
  border-color: rgba(196, 151, 59, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.log-card:hover::before {
  opacity: 1;
}

.log-card:nth-child(1) { animation-delay: 0.05s; }
.log-card:nth-child(2) { animation-delay: 0.1s; }
.log-card:nth-child(3) { animation-delay: 0.15s; }
.log-card:nth-child(4) { animation-delay: 0.2s; }
.log-card:nth-child(5) { animation-delay: 0.25s; }
.log-card:nth-child(6) { animation-delay: 0.3s; }
.log-card:nth-child(7) { animation-delay: 0.35s; }
.log-card:nth-child(8) { animation-delay: 0.4s; }

.log-card-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--lantern);
  margin-bottom: var(--space-sm);
  line-height: 1.3;
}

.log-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
  flex-wrap: wrap;
}

.log-card-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--mist);
}

.log-card-modified {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--slate);
  font-style: italic;
}

.log-card-excerpt {
  font-size: 0.95rem;
  color: var(--mist);
  line-height: 1.6;
}

.log-card-tags {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-top: var(--space-md);
}

/* Tag Badge */
.log-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  padding: 4px 12px;
  background: rgba(62, 191, 173, 0.08);
  border: 1px solid rgba(62, 191, 173, 0.15);
  border-radius: 100px;
  color: var(--signal-teal);
  letter-spacing: 0.02em;
  backdrop-filter: blur(4px);
  transition: all 0.2s ease;
}

/* Filter Tags */
.log-filters {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: var(--space-lg);
}

.log-filter-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  padding: 5px 14px;
  background: rgba(21, 42, 32, 0.5);
  border: 1px solid rgba(58, 74, 68, 0.6);
  border-radius: 100px;
  color: var(--mist);
  letter-spacing: 0.02em;
  cursor: pointer;
  user-select: none;
  backdrop-filter: blur(4px);
  transition: all 0.2s ease;
}

.log-filter-tag:hover {
  background: rgba(62, 191, 173, 0.08);
  border-color: rgba(62, 191, 173, 0.3);
  color: var(--signal-teal);
  box-shadow: 0 0 0 1px rgba(62, 191, 173, 0.1);
}

.log-filter-tag.active {
  background: rgba(62, 191, 173, 0.12);
  border-color: rgba(62, 191, 173, 0.4);
  color: var(--signal-teal);
  box-shadow: 0 0 0 1px rgba(62, 191, 173, 0.15);
}

/* State Indicators */
.log-loading,
.log-empty,
.log-error {
  text-align: center;
  padding: var(--space-xl);
  color: var(--mist);
  font-size: 1rem;
}

.log-error {
  color: var(--spectrum-coral);
}

.log-error-retry {
  display: inline-block;
  margin-top: var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--signal-teal);
  cursor: pointer;
  border: 1px solid var(--signal-teal);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  background: transparent;
  transition: all 0.2s ease;
}

.log-error-retry:hover {
  background: rgba(62, 191, 173, 0.15);
}

/* Post View */
.log-post {
  max-width: 760px;
  margin: 0 auto;
}

.log-post-header {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(196, 151, 59, 0.3);
}

.log-post-header h1 {
  font-size: 2.25rem;
  margin-bottom: var(--space-md);
}

.log-post-back {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--signal-teal);
  margin-bottom: var(--space-lg);
  transition: color 0.2s ease;
}

.log-post-back:hover {
  color: var(--signal-glow);
}

/* Markdown Content */
.log-content h1 {
  font-size: 2rem;
  color: var(--lantern);
  margin: var(--space-xl) 0 var(--space-md);
  padding-bottom: 0.4em;
  border-bottom: 1px solid rgba(58, 74, 68, 0.4);
}

.log-content h2 {
  font-size: 1.6rem;
  color: var(--lantern);
  margin: var(--space-xl) 0 var(--space-md);
  padding-bottom: 0.4em;
  border-bottom: 1px solid rgba(58, 74, 68, 0.4);
}

.log-content h3 {
  font-size: 1.3rem;
  color: var(--lantern);
  margin: var(--space-lg) 0 var(--space-sm);
}

.log-content h4 {
  font-size: 1rem;
  color: var(--chalk);
  margin: var(--space-lg) 0 var(--space-sm);
  text-transform: none;
  letter-spacing: normal;
}

.log-content p {
  color: var(--chalk);
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: var(--space-md);
}

.log-content a {
  color: var(--signal-teal);
  text-decoration: underline;
  text-decoration-color: rgba(62, 191, 173, 0.4);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}

.log-content a:hover {
  text-decoration-color: var(--signal-teal);
  color: var(--signal-glow);
}

/* Emphasis & Strikethrough */
.log-content strong {
  color: var(--chalk);
  font-weight: 600;
}

.log-content em {
  color: rgba(228, 232, 230, 0.85);
}

.log-content del {
  color: var(--mist);
  text-decoration-color: var(--mist);
}

/* Blockquotes */
.log-content blockquote {
  border-left: 4px solid var(--brass);
  background: linear-gradient(90deg, rgba(196, 151, 59, 0.04) 0%, transparent 100%);
  padding: var(--space-md) var(--space-lg);
  margin: var(--space-lg) 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.log-content blockquote p {
  font-style: italic;
  color: rgba(228, 232, 230, 0.75);
  margin-bottom: 0;
}

.log-content blockquote p + p {
  margin-top: var(--space-sm);
}

/* Lists */
.log-content ul,
.log-content ol {
  margin: var(--space-md) 0;
  padding-left: var(--space-lg);
}

.log-content ul {
  list-style: disc;
}

.log-content ul li::marker {
  color: var(--signal-teal);
}

.log-content ol li::marker {
  color: var(--brass);
  font-family: var(--font-mono);
}

.log-content li {
  margin-bottom: var(--space-sm);
  line-height: 1.7;
  color: var(--chalk);
}

/* Task Lists */
.log-content .task-list-item {
  list-style: none;
  margin-left: calc(-1 * var(--space-lg));
  padding-left: 0;
}

.log-content .task-list-item input[type="checkbox"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 1px solid var(--slate);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.3);
  vertical-align: middle;
  margin-right: var(--space-sm);
  position: relative;
  cursor: default;
  transition: all 0.15s ease;
}

.log-content .task-list-item input[type="checkbox"]:checked {
  background: rgba(62, 191, 173, 0.15);
  border-color: var(--signal-teal);
}

.log-content .task-list-item input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: -1px;
  left: 2px;
  font-size: 12px;
  color: var(--signal-teal);
}

/* Tables */
.log-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: var(--space-lg) 0;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(58, 74, 68, 0.4);
}

.log-content thead th {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--chalk);
  padding: 10px 16px;
  background: linear-gradient(135deg, rgba(21, 42, 32, 0.8) 0%, rgba(30, 58, 43, 0.6) 100%);
  border-bottom: 2px solid var(--brass);
  text-align: left;
}

.log-content tbody td {
  padding: 10px 16px;
  border-bottom: 1px solid rgba(58, 74, 68, 0.3);
  color: var(--chalk);
}

.log-content tbody tr:last-child td {
  border-bottom: none;
}

.log-content tbody tr:nth-child(even) {
  background: rgba(62, 191, 173, 0.03);
}

.log-content tbody tr:hover {
  background: rgba(21, 42, 32, 0.5);
}

/* Inline Code */
.log-content code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background-color: rgba(0, 0, 0, 0.25);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(62, 191, 173, 0.12);
  word-break: break-word;
}

/* Fenced Code Blocks */
.log-content pre {
  background: linear-gradient(180deg, rgba(10, 22, 16, 0.9) 0%, rgba(13, 31, 23, 0.85) 100%);
  border: 1px solid rgba(58, 74, 68, 0.5);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin: var(--space-lg) 0;
  overflow-x: auto;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 0 rgba(62, 191, 173, 0.05);
}

.log-content pre code {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--chalk);
}

.log-content pre[data-language]::before {
  content: attr(data-language);
  position: absolute;
  top: 0;
  right: 0;
  padding: 2px 10px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--brass);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.85;
  border-bottom-left-radius: var(--radius-sm);
  background: rgba(196, 151, 59, 0.08);
}

/* Footnotes */
.log-content .footnotes {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(196, 151, 59, 0.15);
  font-size: 0.85rem;
}

.log-content .footnotes p {
  font-size: 0.85rem;
  color: var(--mist);
}

.log-content .footnotes li {
  color: var(--mist);
  line-height: 1.5;
}

.log-content .footnotes-sep {
  display: none;
}

.log-content .footnote-ref a,
.log-content .footnote-backref {
  color: var(--signal-teal);
  text-decoration: none;
  font-family: var(--font-mono);
}

/* Images */
.log-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  border: 1px solid rgba(58, 74, 68, 0.4);
  display: block;
  margin: var(--space-lg) 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

/* Horizontal Rule */
.log-content hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196, 151, 59, 0.6), rgba(62, 191, 173, 0.3), rgba(196, 151, 59, 0.6), transparent);
  margin: var(--space-xl) 0;
  opacity: 0.7;
}

/* =============================================
   Custom Prism.js Theme (Workshop)
   ============================================= */

code[class*="language-"],
pre[class*="language-"] {
  color: var(--chalk);
  text-shadow: none;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  text-align: left;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  word-wrap: normal;
  line-height: 1.6;
  tab-size: 4;
  hyphens: none;
}

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: #8A9690;
  font-style: italic;
}

.token.punctuation {
  color: #8A9690;
}

.token.namespace {
  opacity: 0.7;
}

.token.property,
.token.tag,
.token.constant,
.token.symbol,
.token.deleted {
  color: #C4973B;
}

.token.boolean,
.token.number {
  color: #6ED4C6;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
  color: #3EBFAD;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string,
.token.variable {
  color: #E4E8E6;
}

.token.atrule,
.token.attr-value,
.token.keyword {
  color: #C4973B;
}

.token.function,
.token.class-name {
  color: #E8B84D;
}

.token.regex,
.token.important {
  color: #E8B84D;
}

.token.important,
.token.bold {
  font-weight: bold;
}

.token.italic {
  font-style: italic;
}

.token.entity {
  cursor: help;
}

/* Responsive - Log */
@media (max-width: 768px) {
  .log-post-header h1 {
    font-size: 1.75rem;
  }

  .log-card-meta {
    flex-direction: column;
    gap: var(--space-xs);
  }

  .log-content pre {
    padding: var(--space-md);
    font-size: 0.8rem;
  }

  .log-content pre code {
    font-size: 0.8rem;
  }

  .log-content table {
    display: block;
    overflow-x: auto;
  }

  .log-content h1 { font-size: 1.6rem; }
  .log-content h2 { font-size: 1.3rem; }
  .log-content h3 { font-size: 1.1rem; }

  .log-card-tags { gap: 6px; }
  .log-filters { gap: 6px; }
  .log-content blockquote { padding: var(--space-sm) var(--space-md); }
}
