:root {
  --bg: #ffffff;
  --text: #0e0d0d;
  --text-grey: grey;
  --border: #e0e0e0;
  --font-sans: 'Metrophobic', sans-serif;
  --font-mono: 'Courier New', Courier, monospace;
  --hover: #caba0b; /* ✅ Add this new hover color variable */
}

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

/* Layout */
body {
  background-color: var(--bg);
  color: var(--text);
  font-size: 16px;
  font-family: var(--font-sans);
  display: flex;
  height: 100vh;
  overflow: hidden;
}

aside {
  width: 280px;
  min-height: 100vh;
  padding: 180px 70px 70px 70px;
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  background-color: var(--bg);
  z-index: 999;
}

main {
  margin-left: 280px;
  flex-grow: 1;
  height: 100vh;
  overflow-y: scroll;
  scroll-behavior: smooth;
}

main section {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 100px 60px;
}

/* Sidebar */
.intro p {
  font-size: 14px;
}

.intro h1 {
  font-size: 15px;
  font-weight: bold;
}

.intro h1 a {
  text-decoration: none;
  color: var(--text);
}

.intro h1 a:hover {
  color: var(--hover);
}

nav {
  margin-top: 84px;
}

nav ul {
  list-style: none;
}

nav li {
  text-align: left;

  margin-bottom: 16px;
  font-size: 14px;
}

nav a {
  text-decoration: none;
  color: var(--text);
  display: inline-block;
  transition: 0.3s;
}

nav a span {
  display: block;
  width: 100px; /* ✅ Fixed width for underline */
  border-bottom: 1px solid var(--border);
  padding-bottom: 5px;
  text-align: left; /* ✅ align text to the left */
}
  
nav a:hover {
  color: var(--hover);
}

/* Language Switcher */
.lang-switcher {
  position: absolute;
  bottom: 60px;
  left: 70px;
  font-size: 12px;
  font-family: var(--font-sans);
  color: var(--text);
}

.lang-switcher .lang {
  text-decoration: none;
  color: var(--text);
  margin: 0 2px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.lang-switcher .lang:hover {
  opacity: 1;
}

.lang-switcher .active {
  font-weight: bold;
  opacity: 1;
}

/* Common Text */
main h2 {
  font-family: "Work Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 500;
  font-size: 15px;
  margin-bottom: 32px;
}

main p {
  font-size: 15px;
  line-height: 1.6;
}

/* Canvas */
#ascii-container {
  width: 400px;
  height: 400px;
}

canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Containers */
.container {
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}

/* About / Thoughts Section */
#about-markdown-content,
#thoughts-markdown-content {
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px; /* ✅ move padding here */
}

#about-markdown-content p,
#thoughts-markdown-content p {
  font-style: normal;
  font-size: 15px;
  line-height: 1.8;
  font-family: var(--font-sans);
  color: var(--text);
  margin: 12px 0;
  /* remove padding here */
}


/* research Section */
.section-title {
  font-size: 15px;
  color: var(--text);
  margin: 20px 0 10px;
}

.description {
  font-style: italic;
  font-size: 14px;
  color: var(--text-grey);
  line-height: 1.3;
  margin: 0 0 30px;
}

.divider {
  width: 100%;
  border-top: 1px dashed var(--border);
  margin: 20px 0 30px;
}

/* Entries */
.entry {
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  /* border-bottom: 1px dotted var(--text); */
  line-height: 2;
  text-decoration: none;
  color: var(--text);
  margin-bottom:14px;
  transition: color 0.3s ease;
}

.entry:hover {
  color: var(--hover);
}

.entry-title {
  font-size: 15px;
}

.entry-seed {
  font-size: 13px;
  opacity: 0.6;
}

/* Built Section */
.content {
  font-family: var(--font-sans);
  font-size: 15px;
}

html {
  line-height: 1.6;  /* 默认继承 */
}

.content p strong {
  font-size: 15px;
  font-style:normal;
  line-height: 1.2;
  display: block;
  margin-top: 12px;
  margin-bottom: 8px;
}

.content p {
  font-style: italic;
  font-size: 14px;
  color: var(--text-grey);
  margin-top: 0px;
  margin-bottom: 20px;
}

.content hr {
  border: none;
  border-top: 1px dashed var(--border);
  margin: 20px 0;
  width: 100%;
}

.content p strong a {
  color: var(--text);
  border-bottom: none;
  text-decoration: none;
}

.content p a {
  color: var(--text-grey);
  border-bottom: 1px dotted var(--text);
  text-decoration: none;
}

.content p a:hover {
  color: var(--hover);
}

#thoughts-markdown-content p {
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  font-style: normal; /* ✅ Normal, not italic */
  font-size: 15px; /* ✅ Slightly bigger for essay style */
  color: var(--text); /* ✅ Use your main text color */
  line-height: 1.8;
  margin: 12px 0;
}

#mobile-header {
  display: none;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  margin-top: 0px;
  margin-bottom: 20px;
}

/* Mobile view adjustments */

@media (max-width: 768px) {
  body {
    flex-direction: column;
    height: auto;
    overflow: auto;
  }

  aside {
    display: none;
  }

  #mobile-header {
    display: block; /* Show mobile title */
    font-weight: normal;
    font-size: 14px;
    text-decoration: none;
  }

  #mobile-header a {
    padding-top: 10px;
    color: grey;
    font-size: 13px;
    text-decoration: none;
  }
  
  #mobile-header a:visited {
    color: grey;
  }

  .entry-seed {
    display: none;
  }
  .intro {
    margin: 0;
    padding: 0;
    text-align: center;
  }

  .intro p {
    display: none; /* ✅ Hide { } */
  }

  .intro h1 {
    font-size: 15px;
    margin: 0;
    padding: 0;
    font-weight: bold;
  }

  nav {
    display: none; /* ✅ Completely hide the menu */
  }

  .lang-switcher {
    display: none; /* ✅ Also hide the language switcher */
  }

  main {
    margin: 0;
    padding-top: 60px; /* ✅ Add a little padding so content not hidden behind header */
  }

  main section {
    min-height: auto;
    padding: 40px 20px;
  }

  #ascii-container {
    width: 350px;
    height: 350px;
  }
}