/* ========== BASE STYLESHEET (THEME-AGNOSTIC) ========== */
/* This contains all structure, layout, and typography */
/* Colors are defined in theme-*.css files */

/* ========== RESET / BASE ========== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, "Liberation Mono", "Courier New", monospace;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

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

/* Custom scrollbar for body/page scroll */

body::-webkit-scrollbar {
  width: 10px;
}

body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.8);
}

body::-webkit-scrollbar-thumb {
  background: var(--glow-color);
  border-radius: 5px;
  transition: background 0.2s ease;
}

body::-webkit-scrollbar-thumb:hover {
  background: var(--accent-bright);
}

/* Firefox scrollbar */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--glow-color) rgba(0, 0, 0, 0.8);
}

/* ========== CRT + BACKGROUND ========== */

.crt-theme {
  position: relative;
}

/* Global "glass" glow */

body,
.terminal-frame,
.nav-panel,
.top-bar,
.status-bar {
  text-shadow: 0 0 4px var(--glow-color);
}

/* Noise overlay */

.noise-overlay {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.08;
  mix-blend-mode: soft-light;
  z-index: 1;
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.09) 0,
      rgba(255, 255, 255, 0.09) 1px,
      transparent 1px,
      transparent 2px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.05) 0,
      rgba(255, 255, 255, 0.05) 1px,
      transparent 1px,
      transparent 3px
    );
}

/* Scanlines overlay */

.scanlines-overlay {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 2;
  opacity: 0.13;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.65),
    rgba(0, 0, 0, 0.65) 1px,
    transparent 1px,
    transparent 3px
  );
}

/* Subtle flicker */

.crt-theme {
  animation: crt-flicker 15s infinite;
}

@keyframes crt-flicker {
  0% { opacity: 1; }
  48% { opacity: 0.99; }
  50% { opacity: 0.97; }
  52% { opacity: 1; }
  100% { opacity: 1; }
}

/* Accent helpers */

.accent {
  color: var(--accent-bright);
}

/* ========== PAGE LAYOUT ========== */

.page-shell {
  position: relative;
  z-index: 3;
  display: flex;
  min-height: 100vh;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem;
  gap: 0.75rem;
}

/* ========== NAV PANEL ========== */

.nav-panel {
  position: sticky;
  top: 0.75rem;
  align-self: flex-start;
  width: 260px;
  max-height: calc(100vh - 1.5rem);
  flex-shrink: 0;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  background: linear-gradient(145deg, var(--bg-secondary), var(--bg-primary));
  box-shadow:
    0 0 18px var(--shadow-color),
    inset 0 0 12px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
}

.nav-brand {
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: 0.5rem;
}

.nav-brand-title {
  font-size: 1.1rem;
  text-transform: lowercase;
  letter-spacing: 0.12em;
}

.brand-blink {
  animation: blink-cursor 1.1s steps(2, start) infinite;
}

.nav-brand-sub {
  font-size: 0.7rem;
  opacity: 0.7;
  margin-top: 0.2rem;
}

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

/* ========== ACCESSIBILITY / PERFORMANCE: REDUCED MOTION ========== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  /* Stop constant animation flicker/blinks */
  .crt-theme {
    animation: none !important;
  }

  .brand-blink,
  #intro::after {
    animation: none !important;
  }

  /* Soften heavy overlays */
  .noise-overlay,
  .scanlines-overlay {
    opacity: 0.06;
  }
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--text-primary);
  padding: 0.25rem 0.35rem;
  border-radius: 2px;
  background-color: rgba(0, 0, 0, 0.25);
  border: 1px solid transparent;
  position: relative;
  transition:
    background-color 0.12s ease-out,
    border-color 0.12s ease-out,
    transform 0.05s ease-out,
    text-shadow 0.12s ease-out;
}

.nav-prefix {
  color: var(--accent-bright);
}

.nav-link:hover,
.nav-link:focus-visible {
  outline: none;
  background-color: rgba(0, 0, 0, 0.35);
  border-color: var(--border-bright);
  transform: translateX(1px);
  text-shadow: 0 0 8px var(--glow-color);
}

.nav-link:active {
  transform: translateX(0);
}

.nav-footer {
  margin-top: auto;
  font-size: 0.7rem;
  opacity: 0.8;
  border-top: 1px dashed var(--border-color);
  padding-top: 0.4rem;
}

.nav-footer-line + .nav-footer-line {
  margin-top: 0.15rem;
}

/* Custom scrollbar for nav panel */

.nav-panel::-webkit-scrollbar {
  width: 10px;
}

.nav-panel::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 3px;
}

.nav-panel::-webkit-scrollbar-thumb {
  background: var(--glow-color);
  border-radius: 3px;
  transition: background 0.2s ease;
}

.nav-panel::-webkit-scrollbar-thumb:hover {
  background: var(--accent-bright);
}

/* Firefox scrollbar */
.nav-panel {
  scrollbar-width: thin;
  scrollbar-color: var(--glow-color) rgba(0, 0, 0, 0.4);
}

/* Theme switcher */

.theme-switcher {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.theme-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  text-transform: lowercase;
}

.theme-select {
  width: 100%;
  padding: 0.4rem 0.6rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 3px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-select:hover,
.theme-select:focus {
  border-color: var(--border-bright);
  box-shadow: 0 0 6px var(--glow-color);
  outline: none;
}

.theme-select option {
  background: var(--bg-primary);
  color: var(--text-primary);
  padding: 0.5rem;
}

/* Mode toggle (dark/light) */

.mode-toggle-container {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border-color);
}

.mode-toggle-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(120deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.6));
  border: 1px solid var(--border-color);
  border-radius: 3px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mode-toggle-btn:hover {
  border-color: var(--border-bright);
  box-shadow: 0 0 8px var(--glow-color);
  transform: translateY(-1px);
}

.mode-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.mode-text {
  letter-spacing: 0.05em;
}

/* Mobile nav toggle (shown on small screens) */

.nav-toggle {
  display: none;
  margin-top: 0.5rem;
  padding: 0.25rem 0.4rem;
  font-size: 0.8rem;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-bright);
  border-radius: 2px;
  cursor: pointer;
}

/* ========== MAIN PANEL ========== */

.main-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Top bar */

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  padding: 0.35rem 0.55rem;
  background: radial-gradient(circle at top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.95));
  border: 1px solid var(--border-bright);
  box-shadow:
    0 0 10px var(--shadow-color),
    inset 0 0 8px rgba(0, 0, 0, 0.8);
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.top-bar-label {
  color: var(--accent-bright);
}

.top-bar-separator {
  opacity: 0.7;
}

.top-bar-path {
  opacity: 0.8;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.top-bar-status-indicator {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent-bright);
  box-shadow: 0 0 10px var(--glow-color);
}

.top-bar-status-text {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  opacity: 0.85;
}

.top-bar-time {
  font-family: inherit;
  opacity: 0.7;
}

/* Content panel */

.content-panel {
  flex: 1;
  display: flex;
  padding: 0.25rem;
}

/* Terminal window */

.terminal-frame {
  flex: 1;
  border-radius: 3px;
  border: 1px solid var(--border-bright);
  box-shadow:
    0 0 20px var(--glow-color),
    inset 0 0 12px rgba(0, 0, 0, 0.96);
  background: radial-gradient(circle at top left, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.98));
  display: flex;
  flex-direction: column;
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.4rem;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.7));
  font-size: 0.75rem;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #2a2a2a;
}

.dot-red {
  background: #ff4d4f;
}

.dot-amber {
  background: #ffc53d;
}

.dot-green {
  background: #73d13d;
}

.terminal-title {
  margin-left: 0.4rem;
  opacity: 0.85;
  text-transform: lowercase;
}

.terminal-body {
  flex: 1;
  padding: 0.75rem;
  font-size: 0.9rem;
  color: var(--accent-bright);
  text-shadow: 0 0 6px var(--glow-color);
}

/* Status bar */

.status-bar {
  margin-top: 0.25rem;
  font-size: 0.7rem;
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--border-color);
  background-color: rgba(0, 0, 0, 0.92);
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  opacity: 0.9;
}

/* ========== TYPOGRAPHY & CONTENT STYLES ========== */

h1, h2, h3, h4 {
  margin-top: 0;
  color: var(--text-secondary);
  text-transform: lowercase;
  letter-spacing: 0.08em;
}

h1 {
  font-size: 1.25rem;
}

h2 {
  font-size: 1.05rem;
}

h3 {
  font-size: 0.98rem;
}

p {
  margin: 0.45rem 0;
}

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

a:hover {
  text-decoration: underline;
}

code, pre {
  font-family: inherit;
  font-size: 0.88rem;
}

pre {
  background-color: rgba(0, 0, 0, 0.8);
  border: 1px solid var(--border-color);
  padding: 0.5rem;
  border-radius: 3px;
  overflow-x: auto;
}

/* Simple table styling for project lists etc */

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

th, td {
  padding: 0.35rem 0.4rem;
  border-bottom: 1px solid var(--border-color);
}

th {
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
}

.project-image {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.project-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

/* ========== RESPONSIVE BEHAVIOR ========== */

@media (max-width: 900px) {
  .page-shell {
    flex-direction: column;
  }

  .nav-panel {
    position: relative;
    top: 0;
    width: 100%;
    max-height: none;
    flex-direction: column;
  }

  .nav-toggle {
    display: inline-flex;
    align-self: flex-end;
  }

  .nav-panel.nav-collapsed .nav-menu {
    display: none;
  }
}

@media (max-width: 600px) {
  .terminal-body {
    padding: 0.6rem;
  }

  .top-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .status-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}

#intro {
  display: inline-block;
  font-family: monospace;
  color: var(--accent-bright);
  text-shadow: 0 0 6px var(--glow-color);
  white-space: pre;
}

#intro::after {
  content: "_";
  animation: blink 0.8s infinite;
  margin-left: 3px;
  color: var(--accent-bright);
}

@keyframes blink {
  0% { opacity: 1; }
  50% { opacity: 0; }
  100% { opacity: 1; }
}

/* ========== CONTENT COMPONENTS: CARDS, BADGES, PLACEHOLDERS ========== */

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

.card {
  border: 1px solid var(--border-color);
  background: linear-gradient(145deg, var(--bg-secondary), rgba(0, 0, 0, 0.96));
  box-shadow:
    0 0 12px var(--shadow-color),
    inset 0 0 12px rgba(0, 0, 0, 0.85);
  padding: 0.75rem;
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 100%;
}

.card img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 180px;
  object-fit: cover;
  border: 1px solid var(--border-color);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--shadow-color);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  text-transform: lowercase;
}

.card-header h2 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.06em;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  font-size: 0.78rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
  padding: 0.1rem 0.35rem;
  border-radius: 2px;
  border: 1px solid var(--border-bright);
  background-color: rgba(0, 0, 0, 0.35);
  text-transform: lowercase;
  letter-spacing: 0.05em;
  color: var(--accent-bright);
}

.badge.tag {
  border-style: dashed;
}

.badge.status {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.status-active {
  background-color: rgba(0, 0, 0, 0.4);
  border-color: var(--border-bright);
}

.status-building {
  background-color: rgba(255, 197, 61, 0.16);
  border-color: rgba(255, 197, 61, 0.7);
  color: #ffe9b3;
}

.status-planned {
  background-color: rgba(173, 173, 173, 0.12);
  border-color: rgba(173, 173, 173, 0.55);
  color: #d7d7d7;
}

.card-link {
  margin-top: auto;
  font-size: 0.85rem;
  color: var(--accent-bright);
  text-decoration: none;
  border-bottom: 1px dashed var(--border-color);
  width: fit-content;
}

.card-link:hover {
  text-decoration: none;
  border-color: var(--border-bright);
}

.placeholder-img {
  height: 140px;
  border: 1px dashed var(--border-color);
  background: radial-gradient(circle at top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.85));
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.placeholder-img.small {
  height: 120px;
  max-width: 340px;
  margin-left: auto;
  margin-right: 0;
}

/* ========== ABOUT PAGE LAYOUT ========== */

.about-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
  align-items: start;
  margin-top: 0.75rem;
}

.about-visual {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.about-visual img {
  display: block;
  width: 100%;
  max-width: 280px;
  height: auto;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  box-shadow: 0 0 10px var(--shadow-color);
}

.about-caption {
  font-size: 0.78rem;
  opacity: 0.75;
  margin-top: 0.35rem;
}

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

  .about-visual img {
    max-width: 100%;
  }

  .placeholder-img.small {
    margin: 0;
    width: 100%;
  }
}

/* ========== NOTES WIDGET ========== */

.notes-panel {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  background: linear-gradient(145deg, var(--bg-secondary), rgba(0, 0, 0, 0.92));
  box-shadow:
    0 0 12px var(--shadow-color),
    inset 0 0 10px rgba(0, 0, 0, 0.8);
  border-radius: 3px;
}

.note-form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.65rem;
  border: 1px dashed var(--border-color);
  background: rgba(0, 0, 0, 0.55);
}

.note-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.note-field label {
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.note-field input,
.note-field textarea {
  width: 100%;
  padding: 0.5rem;
  font: inherit;
  color: var(--accent-bright);
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--border-color);
  border-radius: 2px;
  outline: none;
  transition: border-color 0.12s ease-out, box-shadow 0.12s ease-out;
}

.note-field input:focus,
.note-field textarea:focus {
  border-color: var(--border-bright);
  box-shadow: 0 0 8px var(--glow-color);
}

.note-field textarea {
  resize: vertical;
  min-height: 120px;
}

.note-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
}

.note-submit {
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--border-bright);
  background: linear-gradient(120deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.85));
  color: var(--text-secondary);
  text-transform: lowercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  border-radius: 2px;
  transition: transform 0.05s ease-out, box-shadow 0.12s ease-out;
}

.note-submit:hover,
.note-submit:focus-visible {
  outline: none;
  box-shadow: 0 0 10px var(--glow-color);
  transform: translateY(-1px);
}

.note-hint {
  opacity: 0.75;
  letter-spacing: 0.03em;
}

.notes-list-shell {
  border: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.65);
  padding: 0.65rem;
  border-radius: 3px;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.7);
}

.notes-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  text-transform: lowercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.notes-list {
  display: grid;
  gap: 0.6rem;
}

.notes-empty {
  margin-top: 0.25rem;
  font-size: 0.85rem;
  opacity: 0.75;
}

.note-card {
  border: 1px solid var(--border-color);
  background: linear-gradient(140deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.9));
  padding: 0.65rem;
  border-radius: 3px;
  box-shadow:
    0 0 10px var(--shadow-color),
    inset 0 0 10px rgba(0, 0, 0, 0.8);
}

.note-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.note-title {
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.note-meta {
  font-size: 0.78rem;
  opacity: 0.75;
}

.note-body {
  margin: 0.35rem 0 0.5rem;
  white-space: pre-wrap;
  line-height: 1.4;
}

.note-actions-row {
  display: flex;
  justify-content: flex-end;
}

.note-delete {
  border: 1px solid rgba(255, 77, 77, 0.55);
  background: rgba(0, 0, 0, 0.7);
  color: #ffb3b3;
  padding: 0.3rem 0.55rem;
  border-radius: 2px;
  cursor: pointer;
  text-transform: lowercase;
  letter-spacing: 0.05em;
  transition: border-color 0.12s ease-out, box-shadow 0.12s ease-out;
}

.note-delete:hover,
.note-delete:focus-visible {
  outline: none;
  border-color: rgba(255, 77, 77, 0.9);
  box-shadow: 0 0 8px rgba(255, 77, 77, 0.4);
}

@media (max-width: 640px) {
  .note-card-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ========== PROFILE CARD ========== */

.profile-card {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 640px;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  background: linear-gradient(145deg, var(--bg-secondary), rgba(0, 0, 0, 0.94));
  border-radius: 3px;
  box-shadow:
    0 0 14px var(--shadow-color),
    inset 0 0 12px rgba(0, 0, 0, 0.85);
}

.profile-photo {
  width: 140px;
  height: 140px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid var(--border-bright);
  box-shadow: 0 0 12px var(--glow-color);
  flex-shrink: 0;
}

.profile-details {
  flex: 1;
}

.profile-callout {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  color: var(--accent-bright);
  margin-bottom: 0.4rem;
}

@media (max-width: 640px) {
  .profile-card {
    flex-direction: column;
    text-align: center;
    max-width: 100%;
  }

  .profile-photo {
    width: 120px;
    height: 120px;
  }

  .profile-details h2 {
    margin-top: 0.35rem;
  }
}

/* ========== HOME HERO IMAGE ========== */

.hero-shot {
  margin-top: 1rem;
  border: 1px solid var(--border-color);
  background: linear-gradient(145deg, var(--bg-secondary), rgba(0, 0, 0, 0.94));
  padding: 0.5rem;
  border-radius: 3px;
  box-shadow:
    0 0 12px var(--shadow-color),
    inset 0 0 12px rgba(0, 0, 0, 0.85);
  max-width: 600px;
}

.hero-shot img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border-color);
  border-radius: 2px;
  box-shadow: 0 0 10px var(--shadow-color);
}

.hero-caption {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  opacity: 0.78;
}

.hero-shot--secondary {
  max-width: 380px;
  opacity: 0.9;
}

.hero-shot--secondary img {
  box-shadow: 0 0 18px var(--glow-color);
}

.hero-shot--secondary .hero-caption {
  font-size: 0.75rem;
  color: var(--text-secondary);
  opacity: 0.75;
}

/* ========== BLOG / POSTS ========== */

.post-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin: 0.75rem 0 1rem;
}

@media (min-width: 820px) {
  .post-list {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }
}

.post-header {
  margin-bottom: 0.75rem;
}

.post-title {
  margin: 0;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.post-excerpt {
  opacity: 0.85;
}

.post-footer {
  margin-top: 0.9rem;
}

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

.post-body {
  margin-top: 0.75rem;
}

/* ========== COMMENTS SECTION ========== */

.comments-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.comments-title {
  color: var(--accent-bright);
  text-shadow: 0 0 5px var(--glow-color);
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

/* Giscus theme overrides */
.giscus {
  color-scheme: dark;
}

.giscus-frame {
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.3);
}

/* ========== CONTACT FORM ========== */

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 500px;
  margin-top: 1rem;
  padding: 0.85rem;
  border: 1px solid var(--border-color);
  background: linear-gradient(145deg, var(--bg-secondary), rgba(0, 0, 0, 0.85));
  border-radius: 3px;
  box-shadow:
    0 0 12px var(--shadow-color),
    inset 0 0 10px rgba(0, 0, 0, 0.8);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.form-group label {
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  text-transform: lowercase;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.5rem;
  font: inherit;
  color: var(--accent-bright);
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--border-color);
  border-radius: 2px;
  outline: none;
  transition: border-color 0.12s ease-out, box-shadow 0.12s ease-out;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--border-bright);
  box-shadow: 0 0 8px var(--glow-color);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form button[type="submit"] {
  padding: 0.5rem 1rem;
  font: inherit;
  border: 1px solid var(--border-bright);
  background: linear-gradient(120deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.85));
  color: var(--text-secondary);
  text-transform: lowercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  border-radius: 2px;
  transition: transform 0.05s ease-out, box-shadow 0.12s ease-out;
  width: fit-content;
}

.contact-form button[type="submit"]:hover,
.contact-form button[type="submit"]:focus-visible {
  outline: none;
  box-shadow: 0 0 12px var(--glow-color);
  transform: translateY(-1px);
}

.contact-form button[type="submit"]:active {
  transform: translateY(0);
}

@media (max-width: 640px) {
  .contact-form {
    max-width: 100%;
  }
}

/* ========== CODE COPY BUTTON ========== */

.code-block-wrapper {
  position: relative;
  margin: 1rem 0;
}

.code-copy-button {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.7rem;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border-color);
  color: var(--accent-bright);
  font-family: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
  z-index: 10;
}

.code-copy-button:hover {
  background: rgba(0, 0, 0, 0.8);
  border-color: var(--border-bright);
  text-shadow: 0 0 6px var(--glow-color);
}

.code-copy-button.copied {
  background: rgba(0, 0, 0, 0.7);
  border-color: var(--border-bright);
}

.code-copy-button.copy-error {
  background: rgba(255, 102, 102, 0.2);
  border-color: rgba(255, 102, 102, 0.6);
  color: #ff6666;
}

.code-copy-button .copy-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.code-copy-button .copy-text {
  font-size: 0.75rem;
}

@media (max-width: 640px) {
  .code-copy-button {
    padding: 0.3rem 0.5rem;
    font-size: 0.7rem;
  }
  
  .code-copy-button .copy-icon {
    width: 14px;
    height: 14px;
  }
}

/* ========== SEARCH FUNCTIONALITY ========== */

.search-container {
  margin: 2rem 0;
}

.search-box {
  position: relative;
  margin-bottom: 1.5rem;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--border-bright);
  box-shadow: 0 0 8px var(--glow-color);
}

.search-input::placeholder {
  color: rgba(182, 245, 195, 0.5);
}

.search-count {
  display: block;
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.search-results {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.search-result-item {
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  transition: all 0.2s ease;
}

.search-result-item:hover {
  background: rgba(0, 0, 0, 0.4);
  border-color: var(--border-bright);
}

.search-result-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.search-result-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.search-result-header h3 a {
  color: var(--accent-bright);
  text-decoration: none;
  transition: all 0.2s ease;
}

.search-result-header h3 a:hover {
  text-shadow: 0 0 8px var(--glow-color);
}

.search-result-excerpt {
  margin: 0.75rem 0;
  color: var(--text-primary);
  line-height: 1.6;
}

.search-result-excerpt mark {
  background: rgba(255, 255, 102, 0.4);
  color: #ffff00;
  padding: 0.1rem 0.2rem;
  border-radius: 2px;
  font-weight: 600;
}

.search-result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.search-empty {
  padding: 2rem;
  text-align: center;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

.search-empty p {
  margin: 0.5rem 0;
}

.search-hint {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

@media (max-width: 640px) {
  .search-result-header {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* ========== BACK TO TOP BUTTON ========== */

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--border-color);
  color: var(--accent-bright);
  border-radius: 4px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 100;
  font-size: 1.5rem;
  text-decoration: none;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: rgba(0, 0, 0, 0.9);
  border-color: var(--border-bright);
  text-shadow: 0 0 8px var(--glow-color);
  transform: translateY(-2px);
}

@media (max-width: 640px) {
  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.2rem;
  }
}

/* ========== RSS FEED LINK ========== */

.rss-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 153, 0, 0.1);
  border: 1px solid rgba(255, 153, 0, 0.3);
  color: #ff9900;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  margin: 1rem 0;
}

.rss-link:hover {
  background: rgba(255, 153, 0, 0.2);
  border-color: rgba(255, 153, 0, 0.5);
  text-shadow: 0 0 6px rgba(255, 153, 0, 0.6);
}

.rss-icon {
  width: 16px;
  height: 16px;
}

/* ========== SOCIAL LINKS ========== */

.social-links {
  display: flex;
  gap: 1rem;
  margin: 1.5rem 0;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  color: var(--accent-bright);
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.social-link:hover {
  background: rgba(0, 0, 0, 0.6);
  border-color: var(--border-bright);
  text-shadow: 0 0 8px var(--glow-color);
  transform: translateY(-2px);
}

.social-link svg {
  width: 20px;
  height: 20px;
}

/* ========== INTERACTIVE TERMINAL ========== */

.cli-terminal-trigger {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid var(--border-color);
  color: var(--accent-bright);
  border-radius: 4px;
  cursor: pointer;
  z-index: 100;
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.cli-terminal-trigger:hover {
  background: rgba(0, 0, 0, 0.95);
  border-color: var(--border-bright);
  box-shadow: 0 0 12px var(--glow-color);
  transform: translateY(-2px);
}

.cli-terminal-icon {
  font-weight: bold;
}

.cli-terminal-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.cli-terminal-modal.active {
  display: flex;
}

.cli-terminal-window {
  width: 90%;
  max-width: 800px;
  max-height: 80vh;
  background: var(--bg-primary);
  border: 1px solid var(--accent-bright);
  box-shadow: 0 0 30px var(--glow-color), 0 0 60px rgba(0, 0, 0, 0.5);
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cli-terminal-header {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.7));
  border-bottom: 1px solid var(--border-color);
}

.cli-terminal-dots {
  display: flex;
  gap: 0.4rem;
  margin-right: 1rem;
}

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

.cli-dot-red {
  background: #ff5f56;
}

.cli-dot-amber {
  background: #ffbd2e;
}

.cli-dot-green {
  background: #27c93f;
}

.cli-terminal-title {
  flex: 1;
  font-size: 0.85rem;
  color: var(--text-secondary);
  opacity: 0.8;
}

.cli-terminal-close {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 0.5rem;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.cli-terminal-close:hover {
  opacity: 1;
  color: var(--accent-bright);
}

.cli-terminal-body {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  min-height: 300px;
  max-height: 60vh;
  color: var(--text-primary);
  font-size: 0.9rem;
  line-height: 1.5;
}

.cli-terminal-body::-webkit-scrollbar {
  width: 8px;
}

.cli-terminal-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.4);
}

.cli-terminal-body::-webkit-scrollbar-thumb {
  background: var(--glow-color);
  border-radius: 4px;
}

.cli-terminal-line {
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 0.25rem;
}

.cli-terminal-input-line {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.3);
}

.cli-terminal-prompt {
  color: var(--accent-bright);
  margin-right: 0.5rem;
  white-space: nowrap;
  text-shadow: 0 0 6px var(--glow-color);
}

#cli-terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--accent-bright);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  caret-color: var(--accent-bright);
}

#cli-terminal-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.5;
}

/* Terminal output styling */
.term-accent {
  color: var(--accent-bright);
  text-shadow: 0 0 6px var(--glow-color);
}

.term-dim {
  opacity: 0.6;
}

.term-error {
  color: #ff6b6b;
}

.term-success {
  color: #51cf66;
}

.term-warning {
  color: #ffd43b;
}

.term-header {
  color: var(--text-secondary);
  text-decoration: underline;
  margin-top: 0.5rem;
}

.term-dir {
  color: #74c0fc;
}

.term-file {
  color: var(--text-primary);
}

.term-link {
  color: var(--accent-bright);
  text-decoration: underline;
}

.term-label {
  color: var(--accent-bright);
  display: inline-block;
  min-width: 10ch;
}

.term-ascii {
  color: var(--accent-bright);
  white-space: pre;
  font-size: 0.75rem;
  line-height: 1.2;
}

.term-quote {
  color: var(--text-secondary);
  font-style: italic;
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .cli-terminal-trigger {
    bottom: 1rem;
    left: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    font-size: 0.85rem;
  }

  .cli-terminal-window {
    width: 95%;
    max-height: 90vh;
  }

  .cli-terminal-body {
    font-size: 0.8rem;
    padding: 0.75rem;
  }

  .cli-terminal-prompt {
    font-size: 0.75rem;
  }

  #cli-terminal-input {
    font-size: 0.85rem;
  }

  .term-ascii {
    font-size: 0.6rem;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .cli-terminal-trigger,
  .cli-terminal-modal,
  .cli-terminal-close {
    transition: none;
  }
}

/* ========== CODE PLAYGROUND ========== */

.playground-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.playground-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

.playground-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}

.playground-select {
  padding: 0.4rem 0.6rem;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 3px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.playground-select:hover,
.playground-select:focus {
  border-color: var(--border-bright);
  outline: none;
}

.playground-select option {
  background: var(--bg-primary);
  color: var(--text-primary);
}

.playground-actions {
  display: flex;
  gap: 0.5rem;
}

.playground-btn {
  padding: 0.45rem 0.85rem;
  background: linear-gradient(120deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.7));
  border: 1px solid var(--border-color);
  border-radius: 3px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.playground-btn:hover:not(:disabled) {
  border-color: var(--border-bright);
  box-shadow: 0 0 8px var(--glow-color);
}

.playground-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.playground-btn.primary {
  background: linear-gradient(120deg, rgba(0, 80, 0, 0.4), rgba(0, 40, 0, 0.7));
  border-color: var(--accent-bright);
  color: var(--accent-bright);
}

.playground-btn.primary:hover:not(:disabled) {
  box-shadow: 0 0 12px var(--glow-color);
}

.playground-btn.copied {
  background: rgba(0, 100, 0, 0.4);
  border-color: #51cf66;
  color: #51cf66;
}

.status-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-ready {
  background: rgba(81, 207, 102, 0.2);
  border: 1px solid rgba(81, 207, 102, 0.5);
  color: #51cf66;
}

.status-loading {
  background: rgba(255, 212, 59, 0.2);
  border: 1px solid rgba(255, 212, 59, 0.5);
  color: #ffd43b;
}

.status-error {
  background: rgba(255, 107, 107, 0.2);
  border: 1px solid rgba(255, 107, 107, 0.5);
  color: #ff6b6b;
}

.status-info {
  background: rgba(116, 192, 252, 0.2);
  border: 1px solid rgba(116, 192, 252, 0.5);
  color: #74c0fc;
}

.playground-editor-container {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.4);
}

.editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.5);
  border-bottom: 1px solid var(--border-color);
}

.editor-title {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.editor-actions {
  display: flex;
  gap: 0.5rem;
}

.editor-btn {
  padding: 0.25rem 0.5rem;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 2px;
  color: var(--text-secondary);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.editor-btn:hover {
  border-color: var(--border-bright);
  color: var(--accent-bright);
}

#code-editor {
  width: 100%;
  min-height: 300px;
  padding: 1rem;
  background: transparent;
  border: none;
  color: var(--accent-bright);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  tab-size: 2;
}

#code-editor::placeholder {
  color: var(--text-secondary);
  opacity: 0.5;
}

.playground-output-container {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.4);
}

.output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.5);
  border-bottom: 1px solid var(--border-color);
}

.output-title {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

#execution-time {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

#code-output {
  min-height: 150px;
  max-height: 300px;
  padding: 1rem;
  overflow-y: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  font-size: 0.85rem;
  line-height: 1.5;
}

#code-output::-webkit-scrollbar {
  width: 8px;
}

#code-output::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.4);
}

#code-output::-webkit-scrollbar-thumb {
  background: var(--glow-color);
  border-radius: 4px;
}

.output-line {
  margin-bottom: 0.25rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.output-normal {
  color: var(--text-primary);
}

.output-error {
  color: #ff6b6b;
}

.output-info {
  color: #74c0fc;
  font-style: italic;
}

.output-warning {
  color: #ffd43b;
}

.playground-shortcuts {
  margin-top: 1rem;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px dashed var(--border-color);
  border-radius: 4px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.shortcuts-title {
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.shortcuts-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.shortcut-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.shortcut-key {
  padding: 0.15rem 0.4rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 2px;
  font-family: inherit;
  font-size: 0.75rem;
  color: var(--accent-bright);
}

/* ========== PLAYGROUND RESOURCES ========== */

.playground-resources {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px dashed var(--border-color);
  border-radius: 4px;
}

.resources-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.resources-header h3 {
  margin: 0 0 0.5rem 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-bright);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.resources-header p {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.8;
}

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

.resource-category {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 1rem;
  transition: all 0.3s ease;
}

.resource-category:hover {
  border-color: var(--accent-bright);
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.1);
}

.category-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.category-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.category-header h4 {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-bright);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.resource-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.resource-link {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid transparent;
  border-radius: 3px;
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
}

.resource-link:hover {
  border-color: var(--accent-bright);
  background: rgba(0, 255, 0, 0.05);
  transform: translateX(2px);
  box-shadow: 0 0 8px rgba(0, 255, 0, 0.15);
}

.resource-link:hover::after {
  content: '↗';
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 0.75rem;
  color: var(--accent-bright);
  opacity: 0.7;
}

.resource-link:focus {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
}

.resource-name {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent-bright);
  line-height: 1.3;
}

.resource-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.4;
  opacity: 0.85;
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .playground-header {
    flex-direction: column;
    align-items: stretch;
  }

  .playground-controls {
    justify-content: space-between;
  }

  .playground-actions {
    justify-content: center;
  }

  #code-editor {
    min-height: 200px;
    font-size: 0.85rem;
  }

  .shortcuts-list {
    flex-direction: column;
    gap: 0.5rem;
  }

  .playground-resources {
    padding: 1rem;
  }

  .resources-header {
    text-align: left;
    margin-bottom: 1rem;
  }

  .resources-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .resource-category {
    padding: 0.875rem;
  }

  .resource-link {
    padding: 0.625rem;
  }

  .resource-list {
    gap: 0.625rem;
  }
}

/* ========== PRINT STYLES ========== */

@media print {
  .noise-overlay,
  .scanlines-overlay,
  .nav-panel,
  .top-bar,
  .status-bar,
  .back-to-top,
  .code-copy-button,
  .nav-toggle,
  .cli-terminal-trigger,
  .cli-terminal-modal {
    display: none !important;
  }

  body {
    background: white;
    color: black;
    font-family: Georgia, serif;
  }

  .terminal-frame {
    border: 1px solid #ddd;
    box-shadow: none;
  }

  .terminal-header {
    display: none;
  }

  .terminal-body {
    padding: 1rem;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  pre,
  code {
    background: #f5f5f5;
    border: 1px solid #ddd;
    page-break-inside: avoid;
  }
}
