:root {
  --paper: #f4efe4;
  --ink: #171512;
  --muted: #6b6257;
  --line: rgba(23, 21, 18, 0.18);
  --accent: #c84f31;
  --accent-dark: #7b2d1f;
  --panel: rgba(255, 250, 240, 0.7);
  --shadow: 0 24px 80px rgba(42, 32, 18, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 10%, rgba(200, 79, 49, 0.18), transparent 26rem),
    radial-gradient(circle at 88% 4%, rgba(23, 21, 18, 0.11), transparent 24rem),
    linear-gradient(135deg, #f7f0df 0%, var(--paper) 48%, #eee1ce 100%);
  font-family: "Noto Serif SC", "Songti SC", serif;
  min-height: 100vh;
}

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

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.24;
  z-index: 1;
  background-image:
    linear-gradient(rgba(23, 21, 18, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 21, 18, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 2;
}

.site-header {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Victor Mono", monospace;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #fff8eb;
  background: var(--ink);
  border-radius: 50%;
  letter-spacing: -0.06em;
}

.brand-text,
.nav-links {
  font-family: "Victor Mono", monospace;
  font-size: 0.9rem;
}

.nav-links {
  display: flex;
  gap: 22px;
  color: var(--muted);
}

.nav-links a:hover,
.post-card a:hover,
.site-footer a:hover {
  color: var(--accent-dark);
}

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

.hero {
  min-height: 74vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 48px;
  align-items: center;
  padding: 72px 0 56px;
}

.eyebrow,
.post-meta,
.status-label {
  margin: 0;
  color: var(--accent-dark);
  font-family: "Victor Mono", monospace;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1 {
  max-width: 860px;
  margin: 18px 0;
  font-size: clamp(3.1rem, 8vw, 7rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
}

.hero-summary {
  max-width: 640px;
  margin: 0;
  color: var(--muted);
  font-size: 1.16rem;
  line-height: 1.9;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button,
.filter-button {
  border: 1px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
  font: 700 0.92rem "Victor Mono", monospace;
  transition:
    transform 180ms ease,
    background 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.button {
  padding: 13px 20px;
}

.button:hover,
.filter-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(123, 45, 31, 0.14);
}

.primary,
.filter-button.active {
  color: #fff8eb;
  background: var(--ink);
}

.ghost {
  background: transparent;
}

.status-panel {
  display: grid;
  gap: 1px;
  overflow: hidden;
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 8px;
  box-shadow: var(--shadow);
  transform: rotate(1.5deg);
}

.status-panel div {
  padding: 22px;
  background: var(--panel);
  backdrop-filter: blur(12px);
}

.status-panel strong {
  display: block;
  margin-top: 6px;
  font-family: "Victor Mono", monospace;
  font-size: 1.05rem;
}

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}

h2 {
  margin: 10px 0 0;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0;
}

.filter-button {
  padding: 10px 15px;
  color: var(--ink);
  background: rgba(255, 250, 240, 0.34);
}

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

.post-card {
  min-height: 310px;
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: rgba(255, 250, 240, 0.52);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(42, 32, 18, 0.08);
  transition:
    transform 180ms ease,
    border-color 180ms ease;
}

.post-card:hover {
  transform: translateY(-5px);
  border-color: rgba(123, 45, 31, 0.45);
}

.post-card h3,
.project-list h3 {
  margin: 20px 0 12px;
  font-size: 1.55rem;
  line-height: 1.18;
}

.post-card p:not(.post-meta),
.project-list p,
.about p {
  color: var(--muted);
  line-height: 1.86;
}

.post-card a {
  margin-top: auto;
  font-family: "Victor Mono", monospace;
  font-weight: 700;
}

.projects {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 48px;
  padding: 90px 0;
}

.project-list {
  display: grid;
  gap: 16px;
}

.project-list article {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.project-list span {
  font-family: "Victor Mono", monospace;
  color: var(--accent);
  font-weight: 700;
}

.project-list h3 {
  margin-top: 10px;
}

.about {
  max-width: 820px;
  padding: 58px 0 84px;
  border-top: 1px solid var(--line);
}

.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 38px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-family: "Victor Mono", monospace;
  font-size: 0.86rem;
}

.is-hidden {
  display: none;
}

@media (max-width: 860px) {
  .site-header,
  .projects,
  .site-footer {
    align-items: flex-start;
  }

  .site-header,
  .hero,
  .projects,
  .site-footer {
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
  }

  .hero {
    min-height: auto;
    padding-top: 52px;
  }

  .status-panel {
    transform: none;
  }

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

  .post-card {
    min-height: 250px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
