:root {
  --text-primary: #EAEAEA;
  --text-accent: #C64C4C;
  --text-secondary: #24262B;
  --text-link-color: #DFAF70;
  --text-link-oncursor-color: #F4BF4D;
  --background-primary: #24262B;
  --background-secondary: #B6B6B6;
  --background-code-block: #DCD6CE;
  
  --fon-size-base: calc(1rem / 16);

  --font-size-8: calc(8 * var(--fon-size-base));
  --font-size-12: calc(12 * var(--fon-size-base));
  --font-size-14: calc(14 * var(--fon-size-base));
  --font-size-16: 1rem;
  --font-size-24: calc(24 * var(--fon-size-base));
  --font-size-36: calc(36 * var(--fon-size-base));
  --font-size-54: calc(54 * var(--fon-size-base));
  --font-size-81: calc(81 * var(--fon-size-base));
  --font-size-122: calc(122 * var(--fon-size-base));

  --font-weight-bold: 700;

  --line-height-none: 1;
  --line-height-regular: 1.5;
}

html {
  font-size: var(--font-size-16);
}

body {
  font-family: "Helvetica Neue",
    Arial,
    "Hiragino Kaku Gothic ProN",
    "Hiragino Sans",
    Meiryo,
    sans-serif;

  color: var(--text-primary);
  background-color: var(--background-primary);
  line-height: var(--line-height-regular);
  box-sizing: border-box;
  margin: 0;
  padding: 0 20px;
  @media (min-width: 760px) {
    padding: 0;
  }
}

h1, 
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  padding: 0;
  line-height: 1.2;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

p {
  margin: 0;
  padding: 0;
}

figure {
  margin: 0;
  padding: 0;
}

.container {
  @media (min-width: 760px) {
    max-width: 760px;
    margin-inline: auto;
  }
}

.header {
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--background-secondary);
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.14rem;
}

.header__nav ul {
  display: flex;
  gap: 16px;
  list-style: none;
}

.header__nav-item {
  font-size: var(--font-size-14);
  font-weight: var(--font-weight-bold);
  list-style: none;
  letter-spacing: 0.14rem;
}

.header__nav-item a {
  text-decoration: none;
  color: var(--text-primary);
  transition: color 0.5s ease;

  &:hover {
    color: var(--text-link-oncursor-color);
  }
}

.main {
  padding: 40px 0;
}

footer {
  padding: 20px 0 40px 0;
  text-align: center;
  font-size: var(--font-size-12);
  border-top: 2px solid var(--background-secondary);
}

.article__title {
  font-size: var(--font-size-24);
  font-weight: var(--font-weight-bold);
  margin-bottom: 10px;
  letter-spacing: 0.1rem;
}

.article__timestamps {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.article__timestamp {
  display: flex;
  align-items: center;
  gap: 4px;

  &::before {
    content: 'U';
    display: inline-block;
    width: 16px;
    height: 16px;
    background-color: var(--background-secondary);
    color: var(--text-secondary);
    border-radius: 4px;
    text-align: center;
    font-size: var(--font-size-12);
    font-weight: var(--font-weight-bold);
    line-height: 1.5;
  }
}

.article__timestamp--published {
  &::before {
    content: 'C';
  }
}

.article__tags {
  display: flex;
  gap: 10px;
  margin-bottom: 40px;
}

.article__tag {
  font-size: var(--font-size-12);
  font-weight: var(--font-weight-bold);
  color: var(--text-secondary);
  background-color: var(--background-secondary);
  padding: 4px 20px;
  border-radius: 32px;
}

.article__content {
  padding-bottom: 40px;
  line-height: 1.8;
  letter-spacing: 0.06rem;
}

.article__content h1,h2 {
  margin-bottom: 10px;
  letter-spacing: 0.1rem;
}

.article__content p {
  margin-bottom: 16px;
}

.article__content p:first-of-type::first-letter {
  font-size: var(--font-size-36);
  font-weight: var(--font-weight-bold);
  color: var(--text-accent);
  line-height: 0.8;
}

.article__content ul {
  margin-bottom: 16px;
  list-style: disc;
  padding-left: 20px;
}

.article__content img {
  width: 100%;
  height: auto;
  margin-bottom: 20px;
}

.article__content a {
  color: var(--text-link-color);
  padding: 0 2px;
}

.article__content strong {
  color: var(--text-accent);
  font-weight: var(--font-weight-bold);
}

.article__content pre {
  background-color: var(--background-code-block);
  padding: 20px;
  border-radius: 4px;
  line-height: 1;
  color: var(--text-secondary);
  overflow: auto;
  margin: 0 0 40px;
}

.article__content code:not(:where(pre *)) {
  background-color: var(--background-code-block);
  padding: 4px 6px;
  border-radius: 4px;
  color: var(--text-accent);
  font-size: var(--font-size-14);
  font-weight: var(--font-weight-bold);
  margin: 0 2px;
}

/* article-list */
.article-list__title {
  font-size: var(--font-size-24);
  font-weight: var(--font-weight-bold);
  margin-bottom: 10px;
  letter-spacing: 0.1rem;
}

.article-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 40px;
}

.article-list__description {
  margin-bottom: 20px;
}

.article-list__more {
  font-weight: var(--font-weight-bold);
  color: var(--text-secondary);
  background-color: var(--background-secondary);
  padding: 10px 20px;
  border-radius: 4px;
  text-decoration: none;
  transition: color 0.5s ease, background-color 0.5s ease;
  margin: 0 auto 40px;
  display: block;
  width: fit-content;

  &:hover {
    background-color: var(--text-link-oncursor-color);
  }
}

.article-list__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.article-list__item-timestamp {
  font-size: var(--font-size-12);
  display: flex;
  align-items: center;
  gap: 4px;

  &::before {
    content: 'U';
    display: inline-block;
    width: 12px;
    height: 12px;
    background-color: var(--background-secondary);
    color: var(--text-secondary);
    border-radius: 4px;
    text-align: center;
    font-size: var(--font-size-8);
    font-weight: var(--font-weight-bold);
    line-height: 1.5;
  }
}

.article-list__item-title {
  font-size: var(--font-size-16);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: 0.1rem;
  transition: color 0.5s ease;

  &:hover {
    color: var(--text-link-oncursor-color);
  }
}
