/* Velocity look for Your AstroNotes.
   Colours, type scale and shapes ported from the Obsidian theme Velocity
   by Floodlight (https://github.com/Gonzalo-D-Sales/obsidian-velocity, GPL-3.0).
   Velocity bundles Raveo, a renamed Inter, so this page uses Inter. */

:root {
  --v-accent: #0d70f2;
  --v-accent-soft: rgba(13, 112, 242, 0.10);
  --v-red: rgb(233, 49, 58);
  --v-radius: 10px;
  --v-radius-sm: 6px;

  --bg-color: #f2f2f2;
  --content-bg: #fcfcfc;
  --text-color: #2e2e2e;
  --text-muted: #747474;
  --heading-color: #1f1f1f;

  --primary-color: var(--v-accent);
  --primary-hover: #0a58c0;
  --link-visited: var(--v-accent);

  --border-color: #e4e4e4;
  --border-subtle: #ececec;
  --sidebar-bg: #f2f2f2;
  --sidebar-hover: rgba(0, 0, 0, 0.05);
  --sidebar-active: rgba(0, 0, 0, 0.07);

  --toc-bg: #f7f7f7;
  --toc-border: #e4e4e4;
  --toc-active: var(--v-accent);

  --code-bg: rgba(0, 0, 0, 0.045);
  --code-border: transparent;
  --code-text: #2e2e2e;

  --badge-bg: #f2f2f2;
  --badge-border: #e4e4e4;

  --list-marker: #a3a3a3;
  --quote-bar: #d0d0d0;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.04);
}

@media (prefers-color-scheme: dark) {
  :root {
    --v-accent: #479aff;
    --v-accent-soft: rgba(71, 154, 255, 0.14);
    --v-red: rgb(255, 76, 82);

    --bg-color: #1f1f1f;
    --content-bg: #262626;
    --text-color: #cecece;
    --text-muted: #8b8b8b;
    --heading-color: #e8e8e8;

    --primary-color: var(--v-accent);
    --primary-hover: #7ab6ff;
    --link-visited: var(--v-accent);

    --border-color: #393939;
    --border-subtle: #2f2f2f;
    --sidebar-bg: #1f1f1f;
    --sidebar-hover: rgba(255, 255, 255, 0.05);
    --sidebar-active: rgba(255, 255, 255, 0.08);

    --toc-bg: #222222;
    --toc-border: #333333;
    --toc-active: var(--v-accent);

    --code-bg: rgba(255, 255, 255, 0.05);
    --code-border: transparent;
    --code-text: #cecece;

    --badge-bg: #222222;
    --badge-border: #393939;

    --list-marker: #6a6a6a;
    --quote-bar: #525252;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 20px rgba(0, 0, 0, 0.25);
  }
}

/* type */
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01";
  font-size: 15.5px;
  line-height: 1.6;
  background-color: var(--bg-color);
  -webkit-font-smoothing: antialiased;
}

a, a:visited { color: var(--primary-color); }
a:hover { text-decoration: none; color: var(--primary-hover); }

::selection { background: var(--v-accent-soft); }

.logo,
.header-subtitle,
.article-title,
.article-tagline,
.toc-title,
.markdown-body h1,
.markdown-body h2 {
  font-family: inherit;
}

/* header */
header {
  background-color: color-mix(in srgb, var(--bg-color) 82%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: none;
}

.logo {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.header-subtitle {
  font-style: normal;
  font-size: 0.8rem;
}

.header-tab {
  border-radius: var(--v-radius-sm);
  border: none;
  color: var(--text-muted);
  font-weight: 500;
}

.header-tab:hover { color: var(--heading-color); }

.header-tab.active {
  background-color: var(--sidebar-active);
  color: var(--heading-color);
  border: none;
}

/* sidebars */
.sidebar-left,
.sidebar-right {
  background-color: var(--sidebar-bg);
  border: none;
}

.sidebar-heading {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  border-bottom: none;
  margin-top: 18px;
}

.search-box {
  border: 1px solid transparent;
  border-radius: var(--v-radius-sm);
  background-color: var(--sidebar-active);
  padding: 7px 10px;
}

.search-box:focus {
  border-color: var(--v-accent);
  box-shadow: 0 0 0 3px var(--v-accent-soft);
}

.tree-folder,
.tree-file-link {
  border-radius: var(--v-radius-sm);
}

.tree-folder { font-weight: 550; }

.tree-folder-contents { border-left: 1px solid var(--border-subtle); }

.tree-file-link { color: var(--text-color); }

.tree-file-link:hover {
  text-decoration: none;
  background-color: var(--sidebar-hover);
}

.tree-file-link.active {
  font-weight: 600;
  color: var(--heading-color);
  background-color: var(--sidebar-active);
  border-left: none;
}

.toc-card,
.graph-card #graph-container {
  background-color: var(--content-bg) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--v-radius) !important;
}

.toc-card { padding: 14px 16px; }

.toc-title {
  text-align: left;
  font-weight: 600;
  font-size: 0.8rem;
  border-bottom: none;
  color: var(--text-muted);
}

.toc-link { color: var(--text-muted); }
.toc-link:hover { color: var(--heading-color); text-decoration: none; }
.toc-link.active { color: var(--v-accent); font-weight: 600; }

.graph-controls button {
  border-radius: var(--v-radius-sm) !important;
  border-color: var(--border-subtle) !important;
  background: var(--content-bg) !important;
}

/* page */
main {
  background-color: var(--content-bg);
  border-radius: 14px;
  margin: 12px 0;
  box-shadow: var(--shadow);
  padding: 36px 56px 64px;
}

.article-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 14px;
}

.article-title {
  font-size: 2.1rem;
  font-weight: 340;
  letter-spacing: -0.02em;
}

.article-tagline {
  font-style: normal;
  font-size: 0.8rem;
}

/* headings, Velocity scale */
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  color: var(--heading-color);
  border-bottom: none;
  letter-spacing: -0.012em;
  line-height: 1.3;
}

.markdown-body h1 {
  font-size: 1.85rem;
  font-weight: 340;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.markdown-body h2 { font-size: 1.45rem; font-weight: 600; margin-top: 1.9em; }
.markdown-body h3 { font-size: 1.25rem; font-weight: 600; }
.markdown-body h4 { font-size: 1.12rem; font-weight: 600; }
.markdown-body h5 { font-size: 1.04rem; font-weight: 650; }
.markdown-body h6 { font-size: 1rem; font-weight: 700; color: var(--text-muted); }

.markdown-body strong { color: var(--heading-color); font-weight: 650; }

/* lists with Velocity's short bar markers */
.markdown-body ul { list-style: none; padding-left: 22px; }

.markdown-body ul > li { position: relative; }

.markdown-body ul > li::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 0.8em;
  width: 9px;
  height: 1.5px;
  border-radius: 1px;
  background: var(--list-marker);
}

.markdown-body ul > li.task-list-item::before { display: none; }

.markdown-body ol li::marker { color: var(--text-muted); }

.markdown-body li { margin: 0.2em 0; }

/* rules and quotes */
.markdown-body hr {
  height: 1px;
  background-color: var(--border-color);
}

.markdown-body blockquote {
  background: none;
  border: none;
  border-left: 3px solid var(--quote-bar);
  border-radius: 0;
  padding: 2px 0 2px 18px;
  color: var(--text-muted);
}

/* code */
.markdown-body code {
  border: none;
  border-radius: var(--v-radius-sm);
  padding: 0.15em 0.4em;
  font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.86em;
}

.markdown-body pre {
  border: none;
  border-radius: var(--v-radius);
  padding: 16px 18px;
}

/* images and tables */
.markdown-body img {
  border: none;
  border-radius: var(--v-radius);
}

.table-responsive,
.markdown-body > table {
  border: 1px solid var(--border-color);
  border-radius: var(--v-radius);
  background: transparent;
}

.markdown-body th,
.markdown-body td {
  border: none;
  border-bottom: 1px solid var(--border-subtle);
}

.markdown-body th {
  background: transparent;
  color: var(--text-muted);
  font-weight: 525;
  font-size: 0.85rem;
}

.markdown-body tr:nth-child(even) { background-color: transparent; }
.markdown-body tbody tr:hover { background-color: var(--sidebar-hover); }

.feedback-section { border-top: 1px solid var(--border-subtle); }

@media (max-width: 1080px) {
  main { padding: 28px 32px 48px; }
}

@media (max-width: 768px) {
  main {
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 20px 16px 40px;
  }
  .sidebar-left { border-bottom: 1px solid var(--border-subtle); }
}

/* Home page: hero and semester cards (replaces the old inline wiki styles) */
.welcome-hero {
  text-align: center;
  padding: 32px 20px 28px;
  margin-bottom: 32px;
  background: var(--toc-bg);
  border-radius: var(--v-radius, 12px);
}
.welcome-hero h1 {
  margin: 0 0 10px;
  padding: 0;
  border: none;
  font-size: 2.3rem;
  font-weight: 300;
  color: var(--heading-color);
}
.welcome-hero .hero-sub {
  max-width: 700px;
  margin: 8px auto 0;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-color);
}
.welcome-hero .hero-tag {
  max-width: 650px;
  margin: 8px auto 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.semester-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 36px;
}
.semester-card {
  background: var(--content-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--v-radius, 12px);
  overflow: hidden;
}
.semester-head {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-subtle);
}
.semester-head h3 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--heading-color);
}
.semester-body { padding: 14px 18px 16px; }
.semester-body ul { margin: 0; padding-left: 18px; line-height: 1.7; }
.semester-body li { margin-bottom: 6px; }
.semester-body small { color: var(--text-muted); }
