:root {
  --ink: #1b1d23;
  --muted: #626772;
  --line: #dfe3ea;
  --paper: #fbfaf7;
  --panel: #ffffff;
  --accent: #167f7b;
  --accent-2: #c64b2d;
  --soft: #eef5f4;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid rgba(27, 29, 35, 0.08);
  background: rgba(251, 250, 247, 0.9);
  backdrop-filter: blur(14px);
}

.brand {
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0;
}

nav {
  display: flex;
  gap: clamp(12px, 3vw, 28px);
  font-size: 0.95rem;
}

nav a,
.text-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

main {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  min-height: calc(100vh - 74px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.75fr);
  align-items: center;
  gap: clamp(36px, 7vw, 90px);
  padding: 48px 0 76px;
}

.hero h1,
.article h1 {
  margin: 0;
  font-size: clamp(3.2rem, 9vw, 7.5rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.lead {
  max-width: 690px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.eyebrow,
time {
  margin: 0 0 10px;
  color: var(--accent-2);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 0.78rem;
}

.hero-actions,
.admin-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 18px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.button.ghost {
  background: transparent;
}

.button.danger {
  min-height: 36px;
  border-color: #e2b5aa;
  color: #9a321d;
}

.portrait {
  width: min(100%, 380px);
  aspect-ratio: 4 / 5;
  margin-left: auto;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(22, 127, 123, 0.95), rgba(198, 75, 45, 0.9)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cpath d='M0 80 80 0M-20 60 60-20M20 100l80-80' stroke='%23ffffff' stroke-opacity='.18' stroke-width='8'/%3E%3C/svg%3E");
  color: white;
  box-shadow: 0 24px 70px rgba(27, 29, 35, 0.18);
}

.portrait span {
  font-size: clamp(4rem, 10vw, 8rem);
  font-weight: 900;
}

.section {
  padding: 70px 0;
  border-top: 1px solid var(--line);
}

.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(28px, 7vw, 88px);
}

.section h2,
.panel h1,
.panel h2 {
  margin: 0 0 18px;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  color: var(--muted);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.post-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.post-card img,
.post-placeholder {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  background: linear-gradient(135deg, var(--soft), #f8e6df);
}

.post-card div {
  padding: 20px;
}

.post-card h3 {
  margin: 0 0 8px;
  line-height: 1.2;
}

.post-card p,
.empty {
  color: var(--muted);
}

.article-page {
  padding: 56px 0 90px;
}

.article {
  max-width: 860px;
  margin-top: 28px;
}

.article-image {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: 8px;
  margin: 28px 0;
}

.excerpt {
  color: var(--muted);
  font-size: 1.25rem;
}

.article-content {
  font-size: 1.08rem;
}

.admin-shell {
  min-height: calc(100vh - 74px);
  display: grid;
  place-items: center;
  padding: 48px 0;
}

.admin-shell.wide {
  align-items: start;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 24px;
}

.panel {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(22px, 4vw, 34px);
  background: var(--panel);
}

.login-panel {
  max-width: 440px;
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--ink);
  background: white;
  font: inherit;
}

textarea {
  resize: vertical;
}

.alert {
  border: 1px solid #e2b5aa;
  border-radius: 8px;
  padding: 10px 12px;
  color: #9a321d;
  background: #fff1ed;
}

table {
  width: 100%;
  border-collapse: collapse;
}

td {
  padding: 14px 0;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}

td small {
  display: block;
  color: var(--muted);
}

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

  .hero,
  .split,
  .admin-shell.wide {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .portrait {
    margin: 0;
  }

  .about-grid,
  .post-grid {
    grid-template-columns: 1fr;
  }
}
