/* ===== Blog styles (variables inherited from ../style.css) ===== */

.page {
  padding: 120px 0 80px;
  min-height: 60vh;
}

.page-header {
  margin-bottom: 40px;
}

.page-title {
  font-family: var(--font-serif);
  font-size: clamp(32px, 6vw, 44px);
  font-weight: 900;
  letter-spacing: 0.05em;
  position: relative;
  display: inline-block;
}

.page-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 36px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.page-subtitle {
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-muted);
  letter-spacing: 0.3em;
  font-weight: 300;
}

.nav-link-active {
  color: var(--accent) !important;
}

/* ===== Post list ===== */
.post-list {
  min-height: 120px;
}

.post-loading,
.post-empty {
  color: var(--text-muted);
  font-size: 15px;
  padding: 48px 0;
  text-align: center;
}

.post-item {
  display: block;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text) !important;
  animation: fadeUp 0.5s ease both;
}

.post-item-date {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.post-item-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
  transition: color 0.2s ease;
}

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

.post-item-excerpt {
  margin-top: 8px;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* ===== Full post ===== */
.back-link {
  display: inline-block;
  margin-bottom: 32px;
  font-size: 14px;
  color: var(--text-muted) !important;
}

.back-link:hover {
  color: var(--accent) !important;
}

.post-full-title {
  font-family: var(--font-serif);
  font-size: clamp(26px, 5vw, 36px);
  font-weight: 900;
  line-height: 1.35;
}

.post-full-date {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  margin: 14px 0 36px;
}

.post-content {
  font-size: 16px;
  line-height: 2;
  color: var(--text);
}

.post-content p {
  margin-bottom: 16px;
}

.post-content h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  margin: 36px 0 12px;
}

.post-content h4 {
  font-size: 18px;
  font-weight: 500;
  margin: 28px 0 10px;
}

.post-content ul {
  margin: 0 0 16px 1.4em;
}

.post-content li {
  margin-bottom: 6px;
}

.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 16px;
  margin: 0 0 16px;
  color: var(--text-secondary);
}

.post-content code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--accent-bg);
  padding: 2px 7px;
  border-radius: 5px;
}

.post-content img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  margin: 12px 0;
  box-shadow: var(--shadow);
}

.post-content a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ===== Admin ===== */
.admin-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.field {
  display: block;
  margin-bottom: 18px;
}

.field span {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  line-height: 1.6;
}

.field input,
.field textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  transition: border-color 0.2s ease;
}

.field textarea {
  resize: vertical;
  line-height: 1.8;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 12px 40px;
  border-radius: 100px;
  font-size: 15px;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

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

.status-msg {
  margin-top: 14px;
  font-size: 14px;
  min-height: 20px;
}

.status-msg.ok { color: #4a9e5c; }
.status-msg.err { color: #c05555; }

.upload-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.btn-secondary {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 8px 22px;
  border-radius: 100px;
  font-size: 14px;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.2s ease;
}

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

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

.upload-status {
  font-size: 13px;
  color: var(--text-muted);
}

.admin-list-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  margin: 48px 0 8px;
}

.admin-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.admin-item-info {
  min-width: 0;
}

.admin-item-title {
  font-weight: 500;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-item-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.btn-del {
  flex-shrink: 0;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-del:hover {
  border-color: #c05555;
  color: #c05555;
}

@media (max-width: 640px) {
  .page {
    padding: 100px 0 60px;
  }

  .admin-form {
    padding: 20px;
  }
}
