:root {
  --ink: #151716;
  --muted: #5d6760;
  --paper: #f7f8f5;
  --surface: #ffffff;
  --line: #d9ded7;
  --accent: #2f6f63;
  --accent-dark: #204b45;
  --amber: #c9822d;
  --code: #26312e;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(47, 111, 99, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(47, 111, 99, 0.04) 1px, transparent 1px),
    var(--paper);
  background-size: 44px 44px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

.site-header,
.site-footer {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0;
}

.wordmark {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.12rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-nav a,
.site-footer a {
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

.site-nav a:hover,
.site-footer a:hover {
  color: var(--accent-dark);
  text-decoration-color: currentColor;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 56px;
  width: min(var(--max), calc(100% - 40px));
  margin: 52px auto 96px;
  align-items: end;
}

.hero__content {
  max-width: 850px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 0.98;
  letter-spacing: 0;
}

h1 {
  max-width: 920px;
  margin-bottom: 28px;
  font-size: clamp(3.25rem, 8vw, 6.9rem);
  font-weight: 700;
}

h2 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(2.2rem, 5vw, 4.25rem);
}

h3 {
  margin-bottom: 10px;
  font-size: 1.28rem;
  line-height: 1.2;
}

.hero__summary,
.section__intro p {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.12rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

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

.button--primary {
  color: var(--surface);
  background: var(--ink);
}

.button--secondary {
  background: rgba(255, 255, 255, 0.54);
}

.signal-panel {
  display: grid;
  gap: 22px;
  padding: 28px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--amber);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 24px 80px rgba(38, 49, 46, 0.08);
}

.signal-panel__label,
.timeline-item__meta,
.project-card__type,
.project-card__status,
.case-meta,
.back-link {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.signal-panel strong {
  display: block;
  margin-top: 7px;
  line-height: 1.3;
}

.section {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto 96px;
}

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

.section__intro {
  margin-bottom: 34px;
}

.timeline {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.timeline-item {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 34px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.timeline-item p,
.project-card p {
  color: var(--muted);
}

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

.project-card {
  display: flex;
  min-height: 280px;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.project-card:hover {
  border-color: rgba(47, 111, 99, 0.6);
  box-shadow: 0 20px 70px rgba(38, 49, 46, 0.08);
  transform: translateY(-2px);
}

.project-card h3 {
  margin-top: 18px;
  font-size: 1.75rem;
}

.project-card__status {
  margin-top: auto;
  color: var(--accent-dark);
}

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

.writing-card {
  display: flex;
  min-height: 430px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 16px 52px rgba(38, 49, 46, 0.06);
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.writing-card:hover,
.writing-card:focus-visible {
  border-color: rgba(47, 111, 99, 0.6);
  box-shadow: 0 20px 70px rgba(38, 49, 46, 0.1);
  transform: translateY(-2px);
}

.writing-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--code);
}

.writing-card--text {
  justify-content: flex-end;
  border-top: 5px solid var(--accent);
  background:
    linear-gradient(135deg, rgba(47, 111, 99, 0.12), transparent 48%),
    rgba(255, 255, 255, 0.84);
}

.writing-card__content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 22px;
}

.writing-card__meta {
  color: var(--accent-dark);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.writing-card h3 {
  margin-top: 14px;
  font-size: 1.28rem;
}

.writing-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 0 44px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.site-footer div {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.case-page {
  width: min(920px, calc(100% - 40px));
  margin: 42px auto 88px;
}

.back-link {
  display: inline-block;
  margin-bottom: 34px;
  text-decoration: none;
}

.case-hero {
  padding-bottom: 42px;
  border-bottom: 1px solid var(--line);
}

.case-hero h1 {
  margin-bottom: 20px;
  font-size: clamp(3rem, 7vw, 5.8rem);
}

.case-hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.14rem;
}

.case-meta {
  margin-bottom: 20px;
  color: var(--accent-dark);
}

.case-section {
  padding: 38px 0;
  border-bottom: 1px solid var(--line);
}

.case-section h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.outline-list {
  display: grid;
  gap: 16px;
  padding: 0;
  margin: 24px 0 0;
  list-style: none;
}

.outline-list li {
  padding-left: 18px;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}

.note {
  padding: 20px;
  border: 1px solid rgba(201, 130, 45, 0.45);
  border-radius: 8px;
  color: var(--code);
  background: rgba(201, 130, 45, 0.1);
}

.post-page {
  width: min(860px, calc(100% - 40px));
  margin: 42px auto 88px;
}

.post-hero {
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line);
}

.post-hero h1 {
  margin-bottom: 24px;
  font-size: clamp(2.7rem, 7vw, 5.5rem);
}

.post-hero__image {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--code);
}

.post-body {
  padding-top: 34px;
  color: var(--code);
  font-size: 1.08rem;
}

.post-body p,
.post-body h2,
.post-body h3,
.post-body blockquote,
.post-body ol,
.post-body pre {
  margin: 0 0 22px;
}

.post-body .lede {
  color: var(--ink);
  font-size: 1.28rem;
  line-height: 1.45;
}

.post-body h2 {
  max-width: none;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.24rem;
  line-height: 1.35;
}

.post-body h3 {
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.35;
}

.post-body strong {
  color: var(--ink);
}

.post-body blockquote {
  padding: 18px 20px;
  border-left: 4px solid var(--accent);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.58);
}

.post-body blockquote p {
  margin: 0;
}

.post-body blockquote p + p {
  margin-top: 8px;
}

.post-body ol {
  padding-left: 1.4rem;
}

.post-body li + li {
  margin-top: 10px;
}

.post-body pre {
  overflow-x: auto;
  padding: 18px;
  border-radius: 8px;
  color: var(--surface);
  background: var(--code);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 860px) {
  .site-header,
  .site-footer,
  .hero,
  .section,
  .case-page,
  .post-page {
    width: min(100% - 28px, var(--max));
  }

  .site-header,
  .site-footer,
  .timeline-item {
    display: block;
  }

  .site-nav {
    margin-top: 14px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 34px;
    margin-top: 34px;
  }

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

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

  .timeline-item__meta {
    margin-bottom: 12px;
  }

  .site-footer div {
    margin-top: 12px;
  }
}
