:root{

  /* main */
  --main-text-color: #555;
  --black-color: #000;
  --accent-text-color: #333;

  --accent-text-color-1: #444;
  --accent-text-color-2: #666;
  --accent-text-color-3:#999;
  --accent-text-color-4:#e8e3dc;
  --article-card-bg:#fff;

  --article-bg:#fcfcff;
  --vocab-bg:#fffbea;
  --vocab-line:#fcd96b;
  --video-bg:#e0efff;
  --joke-line:#777;

  /* check */
  --check-color: gray;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* articlelist */
h1 {
  padding: 0.5rem 0.5rem;
  font-size: 2rem;
  text-align: center;

}

.intro-text {
  text-align: center;
  font-size: 1rem;
  color: var(--accent-text-color-2);
  margin-bottom: 1rem;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem 1rem;
  padding: 1rem 1rem;
  max-width: 1000px;
  margin: 0 auto;
}

.card {
  background: var(--article-card-bg);
  border-radius: 0%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  overflow: hidden;
  transition: transform 0.2s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 170px;
}

.card:hover {
  transform: translateY(-4px);
}


.card-content {
  padding: 1em;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card h2 {
  font-size: 1rem;
  margin: 0.3em 0;
  color: var(--accent-text-color);
}

.card p {
  font-size: 0.9rem;
  color: var(--main-text-color);
  flex-grow: 1;
}

.card time {
  display: block;
  margin-top: 0.5em;
  font-size: 0.8rem;
  color: var(--accent-text-color-3);
}

.pagination {
  text-align: center;
  margin: 0;
  margin-bottom: 4rem;
}

.pagination a {
  color: var(--accent-text-color-1);
  font-size: 1.2rem;
  text-decoration: none;
  font-weight: bold;
  border-radius: 0.5px;
  padding: 0.3em 0.7em;
  transition: background-color 0.2s ease;
}

.pagination a:hover {
  color: var(--main-text-color);
  border-bottom: 2.5px solid  var(--main-text-color);

}
.pagination a.active {
  color: var(--main-text-color);
  background-color: var(--accent-text-color-4);
  text-decoration: none;
}

@media (max-width: 900px) {
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .articles-grid {
    grid-template-columns: 1fr;
  }
}




/* article */
.page-layout {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0.5rem;
  gap: 3em;
}

.article-jokeline{
  border-top: 3px solid var(--joke-line);
  border-bottom: 3px solid var(--joke-line);
  padding: 1em 0;
}
.br-adjust {
  display: block;
  height: 0.5em;
}

.sidebar {
  margin-top: 1rem;
  width: 300px;
  flex-shrink: 0;
}
.video-box iframe {
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 10px;
  border: none;
}
.video-box {
  padding: 0.5em;
  background-color: var(--video-bg);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.video-box h4{
  text-align:center;
  margin: 0.5rem 0;
}

.vocab-box {
  background:var(--vocab-bg);
  padding: 1.2em;
  border-radius: 8px;
  border-left: 6px solid var( --vocab-line);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}
.vocab-box ul {
  padding-left: 1rem;
}
.vocab-box li {
  margin-bottom: 0.6em;
  line-height: 1.6;
  font-size: 1.2rem;
}
.article-container {
  margin-top: 1rem;
  margin-bottom: 5rem;
  max-width: 650px;
  min-width: 500px;
  padding: 1.5em 2em;
  border-radius: 16px;
  background-color: var(--article-bg);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.03);
}
.article-container h1 {
  font-size: 2.7rem;
  color: var(--black-color);
  text-align: center;
}
.article-container h2 {
  font-size: 1.7rem;
  color: var(--accent-text-color);
  text-align: center;
  margin-top: 1.5em;
}
.article-container h3 {
  font-size: 1.7rem;
  color: var(--main-text-color);
  margin-top: 1em;
}
.article-container p {
  font-size: 1.3rem;
  margin-top: 1rem;
  color:var(--main-text-color);
  line-height: 1.7;
}
.tags span {
  background: var(--vocab-line);
  padding: 0.3em 0.6em;
  border-radius: 6px;
  margin-right: 0.5em;
  font-size: 0.9rem;
}


@media (max-width: 1300px) {
  .page-layout {
    flex-direction: column;
    align-items: center;
  }

  .sidebar {
    width: 100%;
    max-width: 300px;
  }

  .article-container {
    order: 1;
    max-width: 650px;
    width: 100%;
    min-width: auto;

  }

  .sidebar.vocab {
    order: 2;
    margin-top: -3rem;
  }

  .sidebar.video {
    order: 3;
    margin-bottom: 4rem;
  }
}

@media (max-width: 750px) {
  .page-layout {
    flex-direction: column;
    align-items: center;
  }

  .sidebar {
    width: 100%;
    max-width: 300px;
  }

  .article-container {
    order: 1;
    max-width: 90%;
    width: 100%;
    min-width: auto;

  }

  .sidebar.vocab {
    order: 2;
  }

  .sidebar.video {
    order: 3;
  }
}


