.notebook-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.7);
  align-items: center;
  justify-content: center;
}
.notebook-modal-content {
  background: #23272e;
  border-radius: 10px;
  padding: 0.5em 0.5em 0.5em 0.5em;
  box-shadow: 0 2px 24px #000a;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.notebook-modal-close {
  font-size: 2em;
  color: #7fd6ff;
  cursor: pointer;
  margin-bottom: 0.2em;
  margin-right: 0.3em;
  align-self: flex-end;
  transition: color 0.2s;
}
.notebook-modal-close:hover {
  color: #fff;
}
#notebook-iframe {
  width: 70vw;
  height: 70vh;
  border: none;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 6px #0003;
}
.notebooks-list {
  display: flex;
  flex-direction: column;
  gap: 0.7em;
  margin-bottom: 2em;
}
.notebook-item {
  display: flex;
  align-items: center;
  gap: 1em;
  background: #23272e;
  border-radius: 6px;
  padding: 0.6em 1em;
  box-shadow: 0 1px 4px #0002;
}
.notebook-btn {
  background: #7fd6ff;
  color: #23272e;
  border: none;
  border-radius: 4px;
  padding: 0.2em 0.8em;
  font-size: 0.98em;
  cursor: pointer;
  text-decoration: none;
  margin-left: 0.2em;
  transition: background 0.2s, color 0.2s;
}
.notebook-btn:hover {
  background: #23272e;
  color: #7fd6ff;
  border: 1px solid #7fd6ff;
}
.github-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2em;
}
.github-card {
  background: #23272e;
  border-radius: 8px;
  box-shadow: 0 1px 6px #0003;
  padding: 1em 1.2em;
  min-width: 220px;
  max-width: 300px;
  flex: 1 1 220px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.github-card-header {
  display: flex;
  align-items: center;
  gap: 0.7em;
  margin-bottom: 0.5em;
}
.github-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
}
.github-title {
  font-size: 1.1em;
  font-weight: bold;
  color: #7fd6ff;
}
.github-desc {
  font-size: 0.98em;
  color: #b0b0b0;
  margin-bottom: 0.7em;
}
.github-link {
  color: #7fd6ff;
  text-decoration: none;
  font-weight: bold;
  margin-top: auto;
  transition: color 0.2s;
}
.github-link:hover {
  color: #fff;
  text-decoration: underline;
}
body {
  background: #181a1b;
  color: #e5e5e5;
  font-family: 'Fira Mono', 'Consolas', 'Menlo', monospace;
  margin: 0;
  min-height: 100vh;
}
.terminal {
  max-width: 900px;
  margin: 2.5rem auto;
  background: #23272e;
  border-radius: 8px;
  box-shadow: 0 2px 24px #000a;
  border: 2px solid #222;
  overflow: hidden;
}
.terminal-bar {
  display: flex;
  align-items: center;
  background: #181a1b;
  padding: 0.5em 1em;
  border-bottom: 1px solid #222;
  position: relative;
}
.terminal-bar .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}
.terminal-bar .red { background: #ff5f56; }
.terminal-bar .yellow { background: #ffbd2e; }
.terminal-bar .green { background: #27c93f; }
.terminal-title {
  margin-left: 1em;
  font-weight: bold;
  color: #7fd6ff;
  font-size: 1.1em;
  letter-spacing: 0.02em;
}
#toggle-theme {
  background: #23272e;
  color: #7fd6ff;
  border: 1px solid #333;
  border-radius: 4px;
  width: 32px;
  height: 32px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

#directory-icon {
  margin-left: 0.2em;
  padding: 2px 4px;
  border-radius: 4px;
  color: #7fd6ff;
  transition: background 0.2s, color 0.2s;
}
#directory-icon:hover {
  background: #7fd6ff;
  color: #23272e;
}
#toggle-theme:hover {
  background: #7fd6ff;
  color: #23272e;
}
.terminal-content {
  display: flex;
  flex-wrap: wrap;
  padding: 1.5rem 1.5rem 1.5rem 1.5rem;
  gap: 1.5rem;
  }

  .terminal-main {
    display: flex;
    flex-direction: row;
  }

  .sidebar {
    min-width: 170px;
    background: var(--card);
    border-right: 1.5px solid var(--border);
    padding: 1.2rem 0.7rem 1.2rem 1.1rem;
    font-family: 'Fira Mono', 'Consolas', 'Menlo', monospace;
    font-size: 1em;
    color: var(--text);
    user-select: none;
    height: 100%;
  }
  .dir-root {
    font-weight: bold;
    color: var(--accent);
    margin-bottom: 0.5em;
    font-size: 1.08em;
  }
  .dir-list {
    list-style: none;
    margin: 0;
    padding: 0 0 0 1.2em;
  }
  .dir-item {
    padding: 0.18em 0.2em;
    border-radius: 4px;
    margin-bottom: 0.1em;
    color: var(--text);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
  }
  .dir-item.active, .dir-item:hover {
    background: var(--accent);
    color: var(--card);
  }

  @media (max-width: 900px) {
    .terminal-main {
      flex-direction: column;
    }
    .sidebar {
      min-width: 100%;
      border-right: none;
      border-bottom: 1.5px solid var(--border);
      padding: 0.7rem 1.2rem 0.7rem 1.2rem;
      margin-bottom: 1rem;
    }
    .dir-list {
      padding-left: 0.7em;
    }
  }
}
/* Fade-in animation for CV content */
.cv-photo, .cv-text {
  opacity: 0;
  transition: opacity 0.7s cubic-bezier(.4,0,.2,1);
}
.cv-photo.visible, .cv-text.visible {
  opacity: 1;
}
.cv-photo {
  flex: 0 0 160px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.cv-photo img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #7fd6ff;
  background: #181a1b;
}
.cv-text {
  flex: 1 1 0%;
  min-width: 250px;
  font-size: 1.01em;
  line-height: 1.6;
  white-space: pre-wrap;
  color: #e5e5e5;
}
.cv-text a {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
.cv-text a:hover {
  text-decoration: underline dotted;
}
}

/* Make #, ##, ### lines in <pre> bigger */
.cv-text b {
  display: block;
  font-size: 1.25em;
  font-weight: bold;
  margin: 0.3em 0 0.1em 0;
}
.cv-text .b2 {
  font-size: 1.1em;
  margin: 0.2em 0 0.05em 0;
}
.cv-text .b3 {
  font-size: 1em;
  margin: 0.1em 0 0 0;
  font-weight: bold;
  display: inline;
}
}
@media (max-width: 700px) {
  .terminal-content {
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
  }
  .cv-photo {
    margin-bottom: 1.5rem;
  }
}
[data-theme="light"] body {
  background: #f7f7f8;
  color: #23272e;
}
[data-theme="light"] .terminal {
  background: #fff;
  border: 2px solid #e5e7eb;
  box-shadow: 0 2px 24px #0002;
}
[data-theme="light"] .terminal-bar {
  background: #f7f7f8;
  border-bottom: 1px solid #e5e7eb;
}
[data-theme="light"] .terminal-title {
  color: #007acc;
}
[data-theme="light"] #toggle-theme {
  background: #fff;
  color: #007acc;
  border: 1px solid #e5e7eb;
}
[data-theme="light"] #toggle-theme:hover {
  background: #007acc;
  color: #fff;
}
[data-theme="light"] .cv-photo img {
  background: #f7f7f8;
  border: 2px solid #007acc;
}
[data-theme="light"] .cv-text {
  color: #23272e;
}
