@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=JetBrains+Mono:wght@300;400;500&display=swap');


*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}


:root {
  --bg:       #ffffff;
  --surface:  #ffffff;
  --border:   #eae8e3;
  --text:     #202124;
  --muted:    #5f6368;
  --dim:      #8a8885;
  --accent:   #1a73e8;
  --nav-bg:   #d2e3fc;
  --nav-border: #b4d2fc;
  --sans:     'Plus Jakarta Sans', sans-serif;
  --mono:     'JetBrains Mono', monospace;
}

[data-theme="dark"] {
  --bg:       #0f1115;
  --surface:  #16181d;
  --border:   #2a2c31;
  --text:     #e3e3e3;
  --muted:    #a0a0a0;
  --dim:      #6a6a6a;
  --accent:   #3f82f4;
  --nav-bg:   #17191e;
  --nav-border: #23252a;
}


html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.75;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}


.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 28px;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}


nav {
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
}

.nav-inner {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 28px;
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links a {
  display: block;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 12px 18px;
  transition: background 0.15s, color 0.15s;
}

.nav-links a:hover:not(.active) {
  background: rgba(26, 115, 232, 0.08);
}

.nav-links a.active {
  background: var(--accent);
  color: #ffffff;
}


.hero {
  padding: 88px 0 60px;
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.55s ease 0.05s forwards;
}

h1 {
  font-family: var(--sans);
  font-size: clamp(2.6rem, 6.5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 12px;
}

.hero-tag {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: -0.01em;
  margin-bottom: 24px;
}

.hero-desc {
  font-size: 15.5px;
  color: var(--muted);
  max-width: 500px;
  line-height: 1.8;
  margin-bottom: 28px;
}

.hero-desc a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 4px;
  transition: text-decoration-color 0.15s, color 0.15s;
}

.hero-desc a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}


.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  padding: 9px 16px;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
  border: 1px solid var(--text);
}

.btn-primary:hover {
  background: #333333;
  border-color: #333333;
  color: #ffffff;
}

[data-theme="dark"] .btn-primary:hover {
  background: var(--muted);
  border-color: var(--muted);
  color: var(--bg);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--muted);
}


section {
  padding: 52px 0;
}

body.index-page section:not(.hero) {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

body.index-page section.visible {
  opacity: 1;
  transform: none;
}

.section-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.15em;
  text-transform: lowercase;
  margin-bottom: 24px;
}

.muted-note {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
}


.project-list-clean {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.project-item-clean {
  font-size: 15px;
}

.project-item-clean a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s;
}

.project-item-clean a:hover {
  text-decoration: underline;
}

.project-desc-inline {
  color: var(--muted);
  margin-left: 4px;
}

.tags-inline {
  display: inline-flex;
  gap: 4px;
  margin-left: 8px;
  vertical-align: middle;
}

.tag-clean {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
}


.stack-list-clean {
  display: flex;
  flex-wrap: wrap;
  column-gap: 24px;
  row-gap: 12px;
}

.stack-item-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
}

.stack-icon-inline {
  color: var(--dim);
  font-size: 16px;
}


.lfm-widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  gap: 20px;
  align-items: center;
  max-width: 480px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.015);
}

.lfm-art-wrap {
  position: relative;
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--border);
}

#lfmArt {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

#lfmArt.loaded {
  display: block;
}

.lfm-art-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dim);
  font-size: 20px;
}

.lfm-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lfm-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lfm-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.lfm-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dim);
  flex-shrink: 0;
}

.lfm-dot.live {
  background: #e0354b;
  box-shadow: 0 0 0 0 rgba(224, 53, 75, 0.3);
  animation: pulse 2s infinite;
}

.lfm-logo-link {
  color: var(--dim);
  font-size: 15px;
  text-decoration: none;
  transition: color 0.15s;
}

.lfm-logo-link:hover {
  color: #e0354b;
}

.lfm-track {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lfm-artist {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lfm-album {
  font-size: 12px;
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lfm-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 12px;
  margin-top: 4px;
  opacity: 0;
  transition: opacity 0.3s;
}

.lfm-bars.live {
  opacity: 1;
}

.lfm-bars span {
  display: block;
  width: 2px;
  background: var(--accent);
  border-radius: 1px;
  animation: bar 1s ease-in-out infinite alternate;
}

.lfm-bars span:nth-child(1) { height: 5px;  animation-delay: 0s;    animation-duration: 0.9s; }
.lfm-bars span:nth-child(2) { height: 10px; animation-delay: 0.2s;  animation-duration: 0.7s; }
.lfm-bars span:nth-child(3) { height: 7px;  animation-delay: 0.1s;  animation-duration: 1.1s; }
.lfm-bars span:nth-child(4) { height: 9px;  animation-delay: 0.35s; animation-duration: 0.8s; }

.lfm-history {
  max-width: 480px;
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.lfm-history-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}

.lfm-history-item img,
.lfm-history-dot {
  width: 34px;
  height: 34px;
  border-radius: 5px;
  object-fit: cover;
  background: var(--border);
  flex-shrink: 0;
}

.lfm-history-track,
.lfm-history-artist {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lfm-history-track {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.lfm-history-artist {
  font-size: 12px;
  color: var(--muted);
}

@keyframes bar {
  from { transform: scaleY(0.3); }
  to   { transform: scaleY(1); }
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(224, 53, 75, 0.3); }
  70%  { box-shadow: 0 0 0 5px rgba(224, 53, 75, 0); }
  100% { box-shadow: 0 0 0 0 rgba(224, 53, 75, 0); }
}


.blog-list-clean {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.blog-row-clean {
  display: flex;
  align-items: baseline;
  gap: 16px;
  text-decoration: none;
}

.blog-row-clean:hover .blog-title-clean {
  color: var(--accent);
}

.blog-title-clean {
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  transition: color 0.15s;
}

.blog-desc-clean {
  color: var(--muted);
  font-size: 14px;
}

.blog-date-clean {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
  min-width: 90px;
  flex-shrink: 0;
}


.social-list-clean {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.social-link-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  width: fit-content;
  transition: color 0.15s;
}

.social-link-item:hover {
  color: var(--accent);
}

.social-link-item i {
  color: var(--dim);
  width: 16px;
  text-align: center;
  transition: color 0.15s;
}

.social-link-item:hover i {
  color: var(--accent);
}

.social-handle-inline {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  margin-left: 4px;
}


.post-header {
  padding: 80px 0 36px;
}

.post-title {
  font-family: var(--sans);
  font-size: clamp(2rem, 5vw, 2.6rem);
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 10px;
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
}

.post-subtitle {
  font-size: 15px;
  color: var(--muted);
}

.post-loading {
  padding: 96px 0;
}

.post-body {
  padding-bottom: 80px;
  font-size: 15.5px;
  color: var(--text);
  line-height: 1.8;
}

.post-body h1,
.post-body h2,
.post-body h3 {
  font-family: var(--sans);
  font-weight: 700;
  color: var(--text);
  margin: 2em 0 0.6em;
  letter-spacing: -0.02em;
}

.post-body h1 { font-size: 1.5rem; }
.post-body h2 { font-size: 1.25rem; }
.post-body h3 { font-size: 1.1rem; }

.post-body p {
  margin-bottom: 1.2em;
}

.post-body a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 4px;
  transition: text-decoration-color 0.15s, color 0.15s;
}

.post-body a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.post-body ul,
.post-body ol {
  padding-left: 1.4em;
  margin-bottom: 1.2em;
}

.post-body li {
  margin-bottom: 0.3em;
}

.post-body blockquote {
  border-left: 3px solid var(--border);
  padding-left: 16px;
  color: var(--muted);
  font-style: italic;
  margin: 1.4em 0;
}

.post-body code {
  font-family: var(--mono);
  font-size: 12.5px;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
}

.post-body pre {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
  margin-bottom: 1.4em;
}

.post-body pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  color: var(--text);
}

.post-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2em 0;
}

.post-body img {
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: block;
  margin: 1.4em 0;
}


footer {
  padding: 36px 0 44px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copy,
.footer-pronouns,
.footer-back {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--dim);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-back:hover {
  color: var(--accent);
}


@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}


.contact-form {
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.form-control {
  font-family: var(--sans);
  font-size: 14.5px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}
.form-control:focus {
  border-color: var(--accent);
}
textarea.form-control {
  min-height: 120px;
  resize: vertical;
}


.watchlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.watchlist-item {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.watchlist-item:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}
.watchlist-cover {
  width: 60px;
  height: 85px;
  object-fit: cover;
  border-radius: 4px;
  background: rgba(0,0,0,0.05);
}
.watchlist-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.watchlist-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.watchlist-progress {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
}
.watchlist-badge {
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 600;
}
.badge-anime {
  background: #e3f2fd;
  color: #0d47a1;
}
[data-theme="dark"] .badge-anime {
  background: rgba(63, 130, 244, 0.15);
  color: #8ab4f8;
}
.badge-manga {
  background: #efebe9;
  color: #4e342e;
}
[data-theme="dark"] .badge-manga {
  background: rgba(161, 136, 127, 0.15);
  color: #d7ccc8;
}

nav {
  background: var(--nav-bg) !important;
  border-bottom: 1px solid var(--nav-border) !important;
  transition: background 0.3s, border-color 0.3s;
}

.nav-links a {
  color: var(--accent) !important;
}

.nav-links a.active {
  background: var(--accent) !important;
  color: #ffffff !important;
}

.theme-toggle {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: background 0.15s, color 0.3s;
}

.theme-toggle:hover {
  background: rgba(26, 115, 232, 0.08);
}

[data-theme="dark"] .theme-toggle:hover {
  background: rgba(63, 130, 244, 0.12);
}

.sun-and-moon > :is(.moon, .sun, .sun-beams) {
  transform-origin: center;
  transition: transform 0.5s cubic-bezier(.12, .82, .38, .98);
}

.sun-and-moon > .sun-beams {
  transition: transform 0.5s cubic-bezier(.12, .82, .38, .98), opacity 0.5s linear;
}

.sun-and-moon > .moon > circle {
  transition: transform 0.5s cubic-bezier(.12, .82, .38, .98);
}

[data-theme="dark"] .sun-and-moon > .sun {
  transform: scale(1.75);
}

[data-theme="dark"] .sun-and-moon > .sun-beams {
  opacity: 0;
  transform: rotate(-45deg);
}

[data-theme="dark"] .sun-and-moon > .moon > circle {
  transform: translateX(-12px);
}


@media (max-width: 520px) {
  .hero { padding: 60px 0 52px; }
  .hero-ctas { flex-direction: column; align-items: flex-start; }
  .footer-inner { flex-direction: column; gap: 6px; align-items: flex-start; }
  .blog-row-clean { flex-direction: column; align-items: flex-start; gap: 2px; }
}


@keyframes spin-once {
  0%   { transform: rotate(0deg) scale(1); }
  40%  { transform: rotate(180deg) scale(0.85); }
  100% { transform: rotate(360deg) scale(1); }
}
.theme-toggle.spin .sun-and-moon {
  animation: spin-once 0.6s cubic-bezier(.12, .82, .38, .98);
}


.project-item-clean {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: opacity 0.15s;
}
.project-item-clean.featured {
  padding: 16px 0;
}
.project-item-clean:last-child { border-bottom: none; }
.project-item-clean:hover { opacity: 0.75; }

.project-img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.project-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.project-title-clean {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
}

.project-desc-clean {
  font-size: 13.5px;
  color: var(--muted);
}

.project-meta-row,
.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.project-status {
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dim);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 6px;
}

.project-status.featured {
  color: var(--accent);
  border-color: rgba(26, 115, 232, 0.25);
  background: rgba(26, 115, 232, 0.08);
}

.status-active { color: #137333; }
.status-idea { color: #8a5a00; }
.status-archived { color: var(--dim); }
[data-theme="dark"] .status-active { color: #81c784; }
[data-theme="dark"] .status-idea { color: #ffcc80; }

.project-action {
  font-family: var(--mono);
  font-size: 11px;
}

.guestbook-list {
  display: grid;
  gap: 12px;
  margin-bottom: 26px;
}

.guestbook-entry {
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.guestbook-entry-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
  margin-bottom: 6px;
}

.guestbook-entry-head span:first-child {
  color: var(--text);
  font-weight: 600;
}

.guestbook-entry p {
  color: var(--muted);
  font-size: 13.5px;
  white-space: pre-wrap;
}

.guestbook-form textarea {
  min-height: 120px;
}

.not-found-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.not-found-panel {
  width: 100%;
  max-width: 560px;
}

.not-found-code {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 12px;
}

.not-found-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
}

.project-tag {
  font-family: var(--mono);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(26,115,232,0.08);
  color: var(--accent);
  border: 1px solid rgba(26,115,232,0.15);
}


.md-toolbar {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  padding: 6px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  align-items: center;
}
.md-toolbar + textarea.form-control {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
.md-tool-btn {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 8px;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  line-height: 1.4;
}
.md-tool-btn:hover {
  background: rgba(26,115,232,0.07);
  color: var(--accent);
  border-color: rgba(26,115,232,0.25);
}
.md-tool-sep {
  width: 1px;
  height: 16px;
  background: var(--border);
  margin: 0 2px;
}
.autosave-indicator {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--dim);
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.3s;
}
.autosave-indicator.saved { color: #2e7d32; }
.autosave-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dim);
  transition: background 0.3s;
}
.autosave-indicator.saved .autosave-dot { background: #2e7d32; }
.autosave-indicator.dirty .autosave-dot { background: #f59f00; }


.media-upload-zone {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 36px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: var(--surface);
}
.media-upload-zone:hover,
.media-upload-zone.drag-over {
  border-color: var(--accent);
  background: rgba(26,115,232,0.04);
}
.media-upload-zone p {
  font-size: 13.5px;
  color: var(--muted);
  margin: 6px 0 0;
}
.media-upload-zone .upload-icon {
  font-size: 28px;
  color: var(--dim);
}
.media-upload-input { display: none; }

.media-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 24px;
}
.media-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  display: flex;
  flex-direction: column;
}
.media-item-thumb {
  width: 100%;
  height: 96px;
  object-fit: cover;
  display: block;
  background: var(--border);
}
.media-item-info {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.media-item-name {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.media-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--dim);
}
.media-item-meta span {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 5px;
}
.media-copy-btn {
  font-family: var(--mono);
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: none;
  color: var(--accent);
  cursor: pointer;
  transition: background 0.12s;
  text-align: center;
}
.media-copy-btn:hover { background: rgba(26,115,232,0.07); }
.media-copy-btn.copied { color: #2e7d32; border-color: #2e7d32; }


.projects-manager {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.project-row-admin {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.project-row-admin:last-child { border-bottom: none; }
.proj-drag-handle {
  cursor: grab;
  color: var(--dim);
  font-size: 14px;
  padding: 0 4px;
  user-select: none;
  flex-shrink: 0;
}
.proj-drag-handle:active { cursor: grabbing; }
.proj-thumb {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--border);
}
.proj-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.proj-title-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}
.proj-desc-label {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.proj-link-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--dim);
}
.proj-delete-btn {
  background: none;
  border: 1px solid #fca5a5;
  border-radius: 5px;
  color: #dc2626;
  padding: 3px 8px;
  font-size: 12px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.12s;
}
.proj-delete-btn:hover { background: #fee2e2; }
[data-theme="dark"] .proj-delete-btn {
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}
[data-theme="dark"] .proj-delete-btn:hover {
  background: rgba(239, 68, 68, 0.15);
}
.proj-edit-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--accent);
  padding: 3px 8px;
  font-size: 12px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.12s;
}
.proj-edit-btn:hover { background: rgba(26,115,232,0.07); }
[data-theme="dark"] .proj-edit-btn:hover {
  background: rgba(63, 130, 244, 0.1);
}


.proj-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.proj-modal {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.proj-modal h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.proj-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 4px;
}
