:root {
  --background: #f7ecd5;
  --foreground: #252525;
  --card: #ffffff;
  --muted-foreground: #737373;
  --border: #ebebeb;
  --brand: #009dff;
  --radius: 0.625rem;
  --shell-width: 72rem;
  --content-width: 56rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--foreground);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
  color: var(--brand);
}

.site-shell {
  width: 100%;
  max-width: var(--shell-width);
  margin: 0 auto;
  padding-inline: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(247, 236, 213, 0.92);
  border-bottom: 1px solid rgba(235, 235, 235, 0.8);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
  padding-block: 0.75rem;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.site-logo:hover {
  opacity: 0.9;
}

.site-logo__image {
  display: block;
  height: 1.5rem;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav__link {
  padding: 0.5rem 0.75rem;
  border-radius: calc(var(--radius) - 2px);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  transition: color 0.15s ease, background-color 0.15s ease;
}

.site-nav__link:hover {
  color: var(--brand);
  background: rgba(255, 255, 255, 0.7);
  text-decoration: none;
}

.site-main {
  flex: 1;
}

.site-main > .article,
.site-main > .article-index {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

.site-footer {
  margin-top: auto;
  padding: 4rem 0 5rem;
}

.site-footer__inner {
  display: grid;
  gap: 2.5rem;
}

.site-footer__brand {
  max-width: 24rem;
}

.site-footer__description {
  margin: 1rem 0 0;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--foreground);
}

.site-footer__copy {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.site-footer__columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}

.site-footer__heading {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.site-footer__links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__links li + li {
  margin-top: 1rem;
}

.site-footer__links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
}

.site-footer__links a:hover {
  color: var(--brand);
}

.article h1,
.article-index h1 {
  margin: 0 0 1.5rem;
  font-size: clamp(1.875rem, 4vw, 1.875rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.article h2 {
  margin: 2.5rem 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.article p {
  margin: 0 0 1rem;
  color: var(--foreground);
}

.article p:last-child {
  margin-bottom: 0;
}

.article__figure {
  margin: 0 0 1.5rem;
}

.article__hero {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

.article__lead,
.article-index__lead {
  font-size: 1.125rem;
  line-height: 1.7;
  color: rgba(37, 37, 37, 0.82);
}

.article-index__list {
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
}

.article-index__item + .article-index__item {
  margin-top: 1rem;
}

.article-index__link {
  display: block;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.article-index__link:hover {
  border-color: rgba(0, 157, 255, 0.35);
  box-shadow: 0 8px 24px rgb(0 157 255 / 0.08);
  transform: translateY(-1px);
  text-decoration: none;
}

.article-index__title {
  display: block;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--foreground);
}

.article-index__link:hover .article-index__title {
  color: var(--brand);
}

.article-index__description {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--muted-foreground);
}

@media (min-width: 768px) {
  .site-footer__inner {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    align-items: start;
  }

  .site-footer__columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .site-main > .article,
  .site-main > .article-index {
    padding-top: 2.5rem;
    padding-bottom: 5rem;
  }
}

@media (min-width: 1024px) {
  .site-shell {
    padding-inline: 1.5rem;
  }
}
