:root {
  color-scheme: light;
  --bg: #fbfaf7;
  --surface: #ffffff;
  --surface-soft: #f4f0ed;
  --text: #171717;
  --muted: #6e6a64;
  --faint: #aaa59d;
  --line: #e8e2dc;
  --accent: #c69a6b;
  --shadow: 0 24px 60px rgba(38, 31, 24, 0.12);
  --max: 1150px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #11100f;
  --surface: #191817;
  --surface-soft: #252321;
  --text: #f3f0ec;
  --muted: #b8b0a6;
  --faint: #817a72;
  --line: #302d29;
  --accent: #d5aa78;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background:
    radial-gradient(circle at 10% 0%, rgba(223, 197, 163, 0.2), transparent 30%),
    var(--bg);
  color: var(--text);
}

body {
  min-height: 100vh;
  margin: 0;
  line-height: 1.7;
}

body,
button,
input {
  font: inherit;
}

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

img,
svg {
  display: block;
}

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

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

.brand {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0;
}

.header-actions,
nav {
  display: flex;
  align-items: center;
}

.header-actions {
  gap: 28px;
}

nav {
  gap: 28px;
  color: var(--text);
  font-size: 16px;
  font-weight: 650;
}

nav a,
.section-heading a,
.site-footer a,
.social-links a {
  transition:
    color 160ms ease,
    opacity 160ms ease,
    transform 160ms ease;
}

nav a:hover,
.section-heading a:hover,
.site-footer a:hover {
  color: var(--accent);
}

.theme-toggle {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: var(--text);
  color: var(--bg);
  cursor: pointer;
}

.theme-toggle svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 480px);
  gap: 84px;
  align-items: center;
  padding: 60px 0 74px;
}

.hello {
  margin: 0 0 8px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.25;
}

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

h1 {
  max-width: 660px;
  margin-bottom: 22px;
  font-size: clamp(48px, 6vw, 72px);
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.03;
}

h2 {
  font-size: 24px;
  line-height: 1.25;
}

h3 {
  font-size: 26px;
  line-height: 1.3;
}

.intro {
  max-width: 560px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 20px;
  font-weight: 500;
}

.title-rule {
  display: block;
  width: 52px;
  height: 2px;
  background: var(--accent);
}

.title-rule.small {
  width: 44px;
  margin-top: 14px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 44px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  border-radius: 9px;
  padding: 0 28px;
  font-size: 16px;
  font-weight: 750;
}

.button svg {
  width: 18px;
  height: 18px;
  margin-right: 10px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.button.primary {
  background: var(--text);
  color: var(--bg);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.14);
}

.button.secondary {
  border: 1px solid var(--faint);
  background: transparent;
  color: var(--text);
}

.social-links {
  display: flex;
  gap: 28px;
  margin-top: 46px;
  color: var(--faint);
}

.social-links a:hover {
  color: var(--text);
  transform: translateY(-2px);
}

.social-links svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.hero-image-wrap {
  position: relative;
}

.hero-image-wrap::after {
  position: absolute;
  inset: 18% 6% -7% 6%;
  z-index: -1;
  border-radius: 34px;
  background: rgba(104, 82, 59, 0.14);
  filter: blur(34px);
  content: "";
}

.hero-image-wrap img {
  width: 100%;
  aspect-ratio: 0.88;
  border: 1px solid rgba(23, 23, 23, 0.08);
  border-radius: 18px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.interest-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 8px 0 74px;
}

.interest-card {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 22px;
  align-items: center;
  min-height: 146px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  padding: 28px 32px;
}

.interest-icon,
.subscribe-icon {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--muted);
}

.interest-icon svg,
.subscribe-icon svg {
  width: 35px;
  height: 35px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.interest-card h2 {
  margin-bottom: 6px;
  font-size: 20px;
}

.interest-card p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.section {
  padding: 0 0 36px;
}

.latest-section {
  padding-top: 8px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
  padding: 0 24px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: 28px;
  font-weight: 850;
}

.section-heading a {
  margin-top: 7px;
  color: var(--text);
  font-size: 16px;
  font-weight: 650;
}

.featured-post-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  padding: 20px 24px;
}

.featured-post + .featured-post {
  border-top: 1px solid var(--line);
}

.featured-post a {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  padding: 18px 0;
}

.featured-post img {
  width: 100%;
  height: 178px;
  border-radius: 7px;
  object-fit: cover;
}

.featured-post time,
.post-item time,
.article-header time {
  display: block;
  margin-bottom: 8px;
  color: #a37a56;
  font-size: 15px;
}

.featured-post h3 {
  margin-bottom: 8px;
  font-size: 25px;
  font-weight: 850;
}

.featured-post p {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 17px;
}

.featured-post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.featured-post-meta span,
.tags span {
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 4px 10px;
  color: var(--muted);
  font-size: 14px;
}

.featured-post-meta strong {
  color: var(--muted);
  font-size: 15px;
  font-weight: 650;
}

.featured-post a:hover h3 {
  color: var(--accent);
}

.subscribe-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  margin: 34px 0 22px;
  padding: 30px 28px;
}

.subscribe-copy {
  display: flex;
  align-items: center;
  gap: 24px;
}

.subscribe-copy h2 {
  margin-bottom: 4px;
  font-size: 22px;
}

.subscribe-copy p {
  margin: 0;
  color: var(--muted);
}

.subscribe-form {
  display: flex;
  gap: 12px;
  min-width: min(450px, 100%);
}

.subscribe-form input {
  width: 100%;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  padding: 0 18px;
  outline: none;
}

.subscribe-form input:focus {
  border-color: var(--accent);
}

.subscribe-form button {
  min-width: 110px;
  border: 0;
  border-radius: 9px;
  background: var(--text);
  color: var(--bg);
  font-weight: 750;
  cursor: pointer;
}

.page-head {
  padding: 72px 0 34px;
  border-bottom: 1px solid var(--line);
}

.page-head h1 {
  margin-bottom: 14px;
  font-size: clamp(36px, 7vw, 56px);
}

.page-head p {
  max-width: 580px;
  margin-bottom: 0;
  color: var(--muted);
}

.post-list {
  display: grid;
}

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

.post-item a {
  display: block;
  padding: 24px 0;
}

.post-item h2,
.post-item h3 {
  margin-bottom: 8px;
}

.post-item p {
  margin-bottom: 0;
  color: var(--muted);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.article {
  padding: 72px 0 84px;
}

.article-header {
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.article-header h1 {
  margin-bottom: 18px;
  font-size: clamp(36px, 7vw, 58px);
  line-height: 1.08;
}

.article-header p {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
}

.prose {
  padding-top: 34px;
  font-size: 17px;
}

.prose.narrow {
  max-width: 640px;
}

.prose p,
.prose ul,
.prose ol,
.prose pre {
  margin-bottom: 22px;
}

.prose a {
  border-bottom: 1px solid currentColor;
}

.prose code {
  border-radius: 5px;
  background: var(--surface-soft);
  padding: 2px 5px;
  font-size: 0.9em;
}

.prose pre {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #161616;
  padding: 18px;
  color: #f7f4ed;
}

.prose pre code {
  background: transparent;
  padding: 0;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr repeat(4, auto);
  gap: 54px;
  padding: 18px 24px 32px;
  color: var(--muted);
  font-size: 15px;
}

@media (max-width: 900px) {
  .home-hero {
    grid-template-columns: 1fr;
    gap: 44px;
    padding-top: 38px;
  }

  .hero-image-wrap {
    max-width: 560px;
  }

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

  .featured-post a {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 28px;
  }

  .subscribe-box {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  main,
  .site-header,
  .site-footer {
    width: min(100% - 28px, var(--max));
  }

  .site-header {
    align-items: flex-start;
    gap: 18px;
    flex-direction: column;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

  nav {
    gap: 20px;
  }

  h1 {
    font-size: clamp(42px, 13vw, 56px);
  }

  .home-hero {
    padding-bottom: 46px;
  }

  .intro {
    font-size: 18px;
  }

  .hero-actions {
    gap: 12px;
    margin-top: 34px;
  }

  .button {
    flex: 1;
    min-width: 0;
    padding: 0 18px;
  }

  .social-links {
    margin-top: 34px;
  }

  .interest-card,
  .subscribe-copy {
    grid-template-columns: 60px 1fr;
    gap: 16px;
  }

  .interest-icon,
  .subscribe-icon {
    width: 60px;
    height: 60px;
  }

  .section-heading,
  .featured-post-list {
    padding-right: 18px;
    padding-left: 18px;
  }

  .featured-post a {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .featured-post img {
    height: 190px;
  }

  .featured-post-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .subscribe-copy,
  .subscribe-form {
    flex-direction: column;
    align-items: stretch;
  }

  .subscribe-form {
    min-width: 0;
  }

  .subscribe-form button {
    min-height: 52px;
  }

  .site-footer {
    grid-template-columns: 1fr 1fr;
    gap: 12px 24px;
    padding-right: 0;
    padding-left: 0;
  }
}
