/* Index */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: #0f0f0f;
  color: #f5f5f5;
}

button,
input,
textarea {
  font-family: inherit;
}

header {
  padding: 20px;
  text-align: center;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
}

nav a {
  padding: 8px 4px;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

nav a::before {
  content: "[";
}

nav a::after {
  content: "]";
}

article a {
  padding: 8px 4px;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

article a::before {
  content: "[";
}

article a::after {
  content: "]";
}

main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 24px;
}

footer {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 20px;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(42px, 8vw, 80px);
  font-weight: 700;
  letter-spacing: -0.04em;
}

p {
  margin: 0 0 32px;
  color: #999;
  font-size: 16px;
}

a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #f5f5f5;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.65;
}

svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* Blog */

.blog {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  max-width: 680px;
  margin: 0 auto;
}

.blog h2 {
  margin: 32px 0 12px;
}

.blog > h2 {
  margin: 0 0 20px;
  font-size: 32px;
  letter-spacing: -0.02em;
}

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

.posts li {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding: 12px 0;
  border-bottom: 1px solid #262626;
}

time {
  color: #777;
  font-size: 14px;
}

.author {
  flex-basis: 100%;
  color: #777;
  font-size: 14px;
}

.post .back {
  margin-bottom: 24px;
  color: #999;
}

.post h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.post p {
  margin: 0 0 20px;
  color: #d4d4d4;
  font-size: 17px;
  line-height: 1.65;
}

.post > time {
  display: block;
  margin-bottom: 32px;
}

code {
  font-size: 0.9em;
  padding: 1px 5px;
  background: #1c1c1c;
}

h1 code {
  padding: 0;
  background: none;
}

.table-wrap {
  overflow-x: auto;
  margin: 0 0 20px;
}

table {
  border-collapse: collapse;
  font-size: 15px;
}

th,
td {
  padding: 8px 16px;
  border: 1px solid #333;
  text-align: right;
}

th:first-child,
td:first-child {
  text-align: left;
}

th {
  color: #999;
  font-weight: 500;
}

.post .takeaway {
  padding-left: 16px;
  border-left: 2px solid #f5f5f5;
  color: #f5f5f5;
}

/* Comments */

.comments {
  margin-top: 48px;
  padding-top: 8px;
  border-top: 1px solid #262626;
}

.comments fieldset {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.comments label {
  color: #999;
  font-size: 14px;
}

.comments input,
.comments textarea {
  width: 100%;
  margin-bottom: 12px;
  padding: 10px 12px;
  background: #151515;
  color: #f5f5f5;
  font: inherit;
  border: 1px solid #333;
  border-radius: 0;
  resize: vertical;
}

.comments button {
  align-self: flex-start;
  padding: 8px 20px;
  background: none;
  color: #f5f5f5;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid #f5f5f5;
}

.comments fieldset:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.comments fieldset:disabled * {
  cursor: not-allowed;
}

.comments .note {
  margin: 12px 0 0;
  color: #777;
  font-size: 14px;
}

/* Reactions */

.reactions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}

.reactions button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: none;
  color: #f5f5f5;
  font-size: 15px;
  border: 1px solid #f5f5f5;
}

.reactions svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.reactions button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
