:root {
  --text: #0d0d0d;
  --muted: #4a4a4a;
  --border: #e5e5e5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  background: #fff;
  color: var(--text);
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.wrapper {
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: 0 32px;
}

.site-header {
  background: #fff;
  border-bottom: 1px solid transparent;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}

.brand-mark {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-link {
  font-size: 15px;
  color: var(--text);
}

.admin-link {
  font-size: 13px;
  color: var(--muted);
}

.bareblog-link {
  font-size: 12px;
  color: var(--muted);
}

.content {
  padding: 30px 0 60px;
}

.hero {
  margin: 40px 0 30px;
}

.hero-title {
  font-size: clamp(42px, 6.5vw, 56px);
  font-weight: 400;
  margin: 0;
  letter-spacing: -0.02em;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 48px 32px;
  margin-top: 20px;
}

.post-tile {
  display: grid;
  gap: 10px;
}

.post-title {
  margin: 0;
  font-size: clamp(34px, 4.2vw, 46px);
  font-weight: 400;
  line-height: 1.05;
}

.post-excerpt {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.post-meta {
  font-size: 13px;
  color: var(--muted);
}

article h1,
article h2,
article h3,
article h4,
article h5 {
  letter-spacing: -0.01em;
}

article h1 {
  font-size: 32px;
}

article h2 {
  font-size: 28px;
}

article h3 {
  font-size: 24px;
}

article p {
  margin: 16px 0;
}

article ul,
article ol {
  padding-left: 20px;
}

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

article pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 14px;
  overflow-x: auto;
  border-radius: 6px;
}

article code {
  background: #f0f4f8;
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 90%;
}

.single,
.about-body {
  max-width: 820px;
  margin-bottom: 40px;
}

.single-header,
.about-hero {
  margin: 10px 0 28px;
}

.single-title {
  font-size: clamp(36px, 5.4vw, 52px);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}

.about-hero .hero-title {
  font-size: clamp(36px, 5vw, 48px);
  font-weight: 400;
}

.single-body,
.about-body .page-content {
  font-size: 18px;
  line-height: 1.7;
}

.flash {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}

.flash-item {
  padding: 12px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fffef4;
  color: #433900;
}

.flash-item.success {
  background: #f2fbf5;
  color: #1f5c35;
  border-color: #c8eed5;
}

.flash-item.error {
  background: #fff4f2;
  color: #731b16;
  border-color: #f1c7c0;
}

.btn {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 6px;
  background: #111;
  color: #fff;
  font-size: 14px;
  border: none;
  cursor: pointer;
}

.btn.secondary {
  background: #fff;
  color: #111;
  border: 1px solid var(--border);
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--border);
}

.admin-table th,
.admin-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 14px;
}

.admin-table th {
  background: #fafafa;
  color: #333;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.form-control {
  width: 100%;
  padding: 10px;
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font-family: inherit;
}

.form-label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  display: block;
}

.help-text {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.textarea {
  min-height: 160px;
}

.dual-area {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.preview-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
}

.site-footer {
  border-top: 1px solid #f6f6f6;
  padding: 20px 0 26px;
  background: #fff;
}

.footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  padding-top: 6px;
}

.footer-powered a {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .nav {
    gap: 12px;
  }
}

@media (max-width: 720px) {
  .wrapper {
    padding: 0 20px;
  }
  .post-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
}

.footer-cta {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 24px;
  margin-top: 60px;
  margin-bottom: 30px;
}

.cta-left {
  display: grid;
  gap: 18px;
}

.cta-title {
  font-size: clamp(28px, 4.8vw, 44px);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.cta-button {
  display: inline-block;
  background: #9cff00;
  color: #0d0d0d;
  padding: 18px 28px;
  border-radius: 0;
  font-size: 18px;
  font-weight: 500;
  text-decoration: none;
  box-shadow: none;
  min-width: 190px;
}

.cta-right {
  display: flex;
  align-items: center;
}

.cta-line {
  width: 100%;
  height: 1px;
  background: #7a7a7a;
}

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