:root {
  color-scheme: dark;
  --background: #11110f;
  --text: #efeee8;
  --secondary-text: #9c9b94;
  --border: #34332e;
  --link: #e6a55b;
}

:root[data-theme="light"] {
  color-scheme: light;
  --background: #f7f5ef;
  --text: #22221f;
  --secondary-text: #6d6c65;
  --border: #d7d3c9;
  --link: #9b4d13;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.7;
  display: flex;
  flex-direction: column;
}

.site-header,
main,
.site-footer {
  width: min(100% - 3rem, 700px);
  margin-inline: auto;
}

.site-header {
  padding-block: 2.5rem 4rem;
}

.site-name {
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.header-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
}

nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.9rem;
}

nav a,
.theme-toggle {
  color: var(--secondary-text);
}

nav a {
  text-decoration: none;
}

nav a[aria-current="page"] {
  color: var(--text);
}

.theme-toggle {
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

main {
  flex: 1;
}

h1 {
  max-width: 18ch;
  margin: 0 0 2.5rem;
  font-size: clamp(2rem, 7vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

a {
  color: var(--link);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.08em;
}

a:hover {
  text-decoration-thickness: 0.13em;
}

a:focus-visible,
.theme-toggle:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 4px;
}

.article-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
  list-style: none;
}

.article-list li {
  padding-block: 1.2rem;
  border-bottom: 1px solid var(--border);
}

.article-list a {
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
}

.article-list a:hover {
  color: var(--link);
}

.article p,
.about p {
  margin: 0 0 1.5rem;
}

.about-name {
  font-size: 1.2rem;
  font-weight: 650;
  line-height: 1.5;
}

.site-footer {
  padding-block: 5rem 2rem;
  color: var(--secondary-text);
  font-size: 0.8rem;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 520px) {
  body {
    font-size: 17px;
  }

  .site-header,
  main,
  .site-footer {
    width: min(100% - 2rem, 700px);
  }

  .site-header {
    padding-block: 1.5rem 3rem;
  }

  h1 {
    margin-bottom: 2rem;
  }
}
