/* --- Reset / base styles --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  min-height: 100vh;
  background-color: #ffffff;
  color: #000;
  font-family: "Geist Mono", monospace;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: #000;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.6;
}


/* --- Layout --- */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header {
  max-width: 680px;
  margin: 0 auto;
  padding: 2rem 2rem 1rem;
  text-align: center;
  width: 100%;
}

nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

nav a {
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: rgba(0, 0, 0, 0.5);
}

nav a.active {
  color: rgba(0, 0, 0, 0.9);
}

nav a.active span {
  text-decoration: underline;
}

main {
  flex: 1;
  max-width: 680px;
  margin: 0 auto;
  padding: 3rem 2rem 3rem;
  width: 100%;
}

hr.main-separator {
  max-width: 680px;
  margin: 0 auto;
  width: calc(100% - 4rem);
  border: none;
  border-top: 1px dashed rgba(0, 0, 0, 0.25);
  height: 0;
}

hr.main-separator.top {
  margin-bottom: 0;
}

hr.main-separator.bottom {
  margin-top: 0;
}

h1 {
  font-family: "Geist Mono", monospace;
  font-size: 1.75rem;
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

/* Decode Title */
.decode-title {
  font-family: "Geist Mono", monospace;
  font-size: clamp(1.75rem, 8vw, 6rem);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
  margin: 3rem 0 2rem 0;
  padding: 0;
  text-align: center;
  color: #000;
  text-transform: none;
  opacity: 0;
  transition: opacity 0.1s ease;
}

.decode-title.animating {
  opacity: 1;
}

p {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  color: rgba(0, 0, 0, 0.85);
}

/* Modules section */
.modules-section {
  margin: 3rem 0;
}

.module {
  margin: 2rem 0;
}

.module-header {
  font-family: "Geist Mono", monospace;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.9);
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}

.module-description {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 0.5rem;
  color: rgba(0, 0, 0, 0.85);
}

.module-details {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  font-family: "Geist Mono", monospace;
  font-size: 0.9rem;
}

.module-details li {
  line-height: 1.6;
  margin-bottom: 0.5rem;
  color: rgba(0, 0, 0, 0.65);
}

.module-details li::before {
  content: ":: ";
  color: rgba(0, 0, 0, 0.4);
}

.module-link {
  font-family: "Geist Mono", monospace;
  font-size: 0.9rem;
  text-decoration: underline;
  display: inline-block;
  margin-top: 0.5rem;
}

hr.module-separator {
  border: none;
  border-top: 1px dashed rgba(0, 0, 0, 0.2);
  margin: 2.5rem 0;
}

/* Article list */
.article-item {
  margin: 0 0 2rem 0;
}

.article-item:first-child {
  margin-top: 0;
}

.change-gif {
  max-width: 680px;
  width: calc(100% - 4rem);
  height: auto;
  display: block;
  margin: 0 auto;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.article-title {
  font-family: "Geist Mono", monospace;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: underline;
  display: block;
  margin-bottom: 0;
  color: rgba(0, 0, 0, 0.9);
  line-height: 1.6;
}

.article-description {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 0;
  color: rgba(0, 0, 0, 0.85);
}

.article-meta {
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(0, 0, 0, 0.65);
  margin-bottom: 0;
  font-family: "Geist Mono", monospace;
}

.article-meta a {
  color: rgba(0, 0, 0, 0.65);
  text-decoration: underline;
}

.article-subtitle {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-top: 0.25rem;
  margin-bottom: 3rem;
  text-align: center;
  color: rgba(0, 0, 0, 0.65);
}

hr.article-separator {
  border: none;
  border-top: 1px dashed rgba(0, 0, 0, 0.2);
  margin: 1rem 0;
}

.article-meta-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: rgba(0, 0, 0, 0.65);
}

.meta-author,
.meta-date {
  font-size: 0.9rem;
  color: rgba(0, 0, 0, 0.65);
}

.meta-author a {
  color: rgba(0, 0, 0, 0.65);
  text-decoration: underline;
}

/* Article share */
.article-share {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 3rem 0;
  font-family: "Geist Mono", monospace;
  font-size: 0.9rem;
  color: rgba(0, 0, 0, 0.65);
}

.share-separator {
  color: rgba(0, 0, 0, 0.3);
}

.share-label {
  margin-right: 0.25rem;
}

.share-link {
  color: rgba(0, 0, 0, 0.65);
  text-decoration: none;
}

.share-link:hover .share-text {
  text-decoration: underline;
}

.share-divider {
  color: rgba(0, 0, 0, 0.4);
}


/* Contact section */
.contact-section {
  margin-top: 3rem;
}

.contact-header {
  font-family: "Geist Mono", monospace;
  font-size: 0.9rem;
  color: rgba(0, 0, 0, 0.4);
  margin-bottom: 1.5rem;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-item {
  font-family: "Geist Mono", monospace;
  font-size: 0.9rem;
  display: flex;
  gap: 1rem;
  align-items: baseline;
}

.contact-item a {
  text-decoration: underline;
  min-width: 80px;
}

.contact-desc {
  color: rgba(0, 0, 0, 0.6);
  font-size: 0.9rem;
}

/* Detail page */
.breadcrumb {
  font-family: "Geist Mono", monospace;
  font-size: 0.9rem;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.9);
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
}

.breadcrumb a {
  text-decoration: underline;
}

.page-title {
  font-family: "Geist Mono", monospace;
  font-size: 2.25rem;
  font-weight: 400;
  line-height: 1.4;
  margin-top: 0;
  margin-bottom: 2rem;
  letter-spacing: 0;
}

main.detail-page {
  padding-top: 2rem;
}

main.article-detail {
  padding-top: 0;
}

.detail-section {
  margin: 2.5rem 0;
}

.detail-section:first-child {
  margin-top: 1rem;
}

.section-header {
  font-family: "Geist Mono", monospace;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.9);
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}

.path-item {
  margin: 1rem 0;
}

.path-item p {
  margin-bottom: 0;
  padding-left: 1.5rem;
}

.path-title {
  font-family: "Geist Mono", monospace;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.9);
  margin-bottom: 0.5rem;
}

.detail-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0;
}

.detail-list li {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 0.5rem;
  color: rgba(0, 0, 0, 0.85);
  padding-left: 1.5rem;
  text-indent: -1.5rem;
}

.detail-list li::before {
  content: ":: ";
  color: rgba(0, 0, 0, 0.4);
}


.detail-cta {
  margin: 2.5rem 0;
}

.cta-link {
  text-decoration: underline;
  font-size: 0.9rem;
}

/* Related courses */
.related-courses {
  margin: 2.5rem 0 0;
}

.course-card-full {
  padding: 1.25rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 0;
  margin-top: 1rem;
  width: 100%;
}

.course-card-title {
  font-family: "Geist Mono", monospace;
  font-size: 0.9rem;
  font-weight: 400;
  margin-bottom: 0.75rem;
  color: rgba(0, 0, 0, 0.9);
  letter-spacing: 0.02em;
}

.course-card-desc {
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(0, 0, 0, 0.65);
  margin: 0 0 0.5rem 0;
}

.course-card-link {
  font-family: "Geist Mono", monospace;
  font-size: 0.9rem;
  text-decoration: underline;
  display: inline-block;
}

footer {
  max-width: 680px;
  margin: 0 auto;
  width: 100%;
  text-align: center;
  padding: 1.5rem 2rem;
  font-size: 0.9rem;
  color: rgba(0, 0, 0, 0.5);
}

/* --- Responsive tweaks --- */
@media (max-width: 768px) {
  .change-gif {
    width: calc(100% - 3rem) !important;
  }

  header {
    max-width: 100%;
    padding: 0 1.5rem 0;
  }

  nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #ffffff;
    z-index: 1000;
    transition: transform 0.3s ease;
    padding: 2rem 1.5rem 1rem;
    gap: 1rem;
    width: 100%;
    justify-content: center;
  }

  nav.header-hidden {
    transform: translateY(-100%);
  }

  body {
    padding-top: 80px;
  }

  nav a {
    font-size: 0.9rem;
  }

  .decode-title {
    font-size: clamp(1.5rem, 10vw, 4rem);
    margin: 1.5rem 0 2rem 0;
  }

  main {
    padding: 2rem 1.5rem 3rem;
  }

  main.article-detail {
    padding-top: 0;
  }

  main.article-detail .detail-section:first-child {
    margin-top: 0;
  }

  main.detail-page {
    padding-top: 0.5rem;
  }

  .breadcrumb {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
  }

  .page-title {
    margin-top: 0;
    margin-bottom: 1.5rem;
  }

  main.detail-page .page-title {
    margin-bottom: 4.5rem;
  }

  .article-subtitle {
    margin-bottom: 2rem;
  }

  hr.article-separator {
    margin: 0.5rem -1.5rem;
    width: calc(100% + 3rem);
  }

  hr.main-separator {
    width: calc(100% - 3rem);
  }

  h1 {
    font-size: 2.25rem;
    margin-bottom: 2rem;
  }

  p {
    font-size: 0.9rem;
  }

  .contact-item {
    font-size: 0.9rem;
  }

  .contact-desc {
    font-size: 0.9rem;
  }

  .module-header {
    font-size: 0.9rem;
  }

  .module-description {
    font-size: 0.9rem;
  }

  .module-details {
    font-size: 0.9rem;
  }

  .breadcrumb {
    font-size: 0.9rem;
  }

  .page-title {
    font-size: 1.75rem;
  }

  .section-header {
    font-size: 0.9rem;
  }

  .path-title {
    font-size: 0.9rem;
  }

  .course-card-full {
    padding: 1rem;
  }

  footer {
    padding: 1.5rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .change-gif {
    width: calc(100% - 2rem) !important;
  }

  header {
    max-width: 100%;
    padding: 0 1rem 0;
  }

  nav {
    gap: 0.5rem;
    width: 100%;
    justify-content: space-between;
    padding: 1.75rem 1rem 0.75rem;
    background-color: #ffffff;
  }

  nav a {
    font-size: 0.85rem;
  }

  .decode-title {
    font-size: clamp(1.25rem, 12vw, 3rem);
    margin: 1.25rem 0 2.5rem 0;
  }

  main {
    padding: 2rem 1rem 2rem;
  }

  main.article-detail {
    padding-top: 0;
  }

  main.article-detail .detail-section:first-child {
    margin-top: 0;
  }

  main.detail-page {
    padding-top: 1.5rem;
  }

  .breadcrumb {
    margin-top: 0.5rem;
    margin-bottom: 0.75rem;
  }

  .page-title {
    margin-top: 0;
    margin-bottom: 2.5rem;
  }

  main.detail-page .page-title {
    margin-bottom: 4rem;
  }

  .article-subtitle {
    margin-bottom: 2rem;
    margin-top: -2rem;
  }

  hr.article-separator {
    margin: 0.5rem -1rem;
    width: calc(100% + 2rem);
  }

  hr.main-separator {
    width: calc(100% - 2rem);
  }

  h1 {
    font-size: 1.5rem;
  }

  p {
    font-size: 0.9rem;
  }

  .contact-item {
    font-size: 0.9rem;
  }

  .contact-desc {
    font-size: 0.9rem;
  }

  .module-header {
    font-size: 0.9rem;
  }

  .module-description {
    font-size: 0.9rem;
  }

  .module-details {
    font-size: 0.9rem;
  }

  .breadcrumb {
    font-size: 0.9rem;
  }

  .page-title {
    font-size: 1.5rem;
  }

  .section-header {
    font-size: 0.9rem;
  }

  .path-title {
    font-size: 0.9rem;
  }

  .course-card-full {
    padding: 1rem;
  }

  footer {
    padding: 1rem 1rem;
    font-size: 0.9rem;
  }
}
