:root {
  /* --- Color Palette (Nord) --- */
  --bg: #ECEFF4;          /* Nord6 */
  --text: #2E3440;        /* Nord0 */
  --accent: #5E81AC;      /* Nord10 */
  --accent-hover: #81A1C1;/* Nord9 */
  --code-bg: #E5E9F0;     /* Nord5 */
  --header-text: #2E3440;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #2E3440;        /* Nord0 */
    --text: #ECEFF4;      /* Nord6 */
    --accent: #88C0D0;    /* Nord8 */
    --accent-hover: #81A1C1; /* Nord9 */
    --code-bg: #3B4252;   /* Nord1 */
    --header-text: #ECEFF4;
  }
}

/* --- Typography --- */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.7;
  max-width: 860px;
  margin: auto;
  padding: 2rem 1rem;
  background: var(--bg);
  color: var(--text);
}

h1, h2, h3, h4, h5, h6, .title, .slogan, nav a {
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;
  letter-spacing: -0.02em;
}

h1 { font-weight: 750; margin-bottom: 0.5rem; }
h2 { font-weight: 650; }

/* Links */
a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dotted var(--accent);
  transition: all 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
  border-bottom-style: solid;
}

/* Header */
header {
  margin-bottom: 3.5rem;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 1.75rem;
}

/* Cursor */
.cursor {
  color: var(--accent-hover);
  font-weight: 700;
}

/* Metadata */
time {
  opacity: 0.75;
  font-family: ui-monospace, monospace;
}

/* --- Terminal List (Nord) --- */
.terminal-container {
  margin-top: 2rem;
}

.section-group {
  margin-bottom: 3rem;
}

.cmd-prompt {
  font-family: ui-monospace, monospace;
  margin-bottom: 1rem;
  color: #4C566A; /* Nord3 */
  font-size: 0.9rem;
}

@media (prefers-color-scheme: dark) {
  .cmd-prompt { color: #D8DEE9; }
}

.cmd-prompt .user { color: var(--accent-hover); font-weight: 800; }
.cmd-prompt .at { opacity: 0.75; }
.cmd-prompt .host { color: var(--accent); }
.cmd-prompt .path { color: #A3BE8C; } /* Nord14 */

.terminal-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: ui-monospace, monospace;
}

.terminal-item {
  display: flex;
  align-items: baseline;
  padding: 0.4rem 0;
  border-bottom: 1px dashed rgba(46, 52, 64, 0.12);
}

@media (prefers-color-scheme: dark) {
  .terminal-item { border-bottom-color: rgba(236, 239, 244, 0.12); }
}

.terminal-item:last-child { border-bottom: none; }

.perms {
  color: #4C566A;
  font-size: 0.8rem;
  margin-right: 1rem;
  display: none;
}

@media (prefers-color-scheme: dark) {
  .perms { color: #D8DEE9; }
}

.size {
  color: var(--accent);
  font-size: 0.8rem;
  width: 3.5rem;
  text-align: right;
  margin-right: 1rem;
}

.date {
  color: #4C566A;
  width: 4rem;
  margin-right: 1rem;
  font-size: 0.9rem;
}

@media (prefers-color-scheme: dark) {
  .date { color: #D8DEE9; }
}

.terminal-item .title {
  flex-grow: 1;
  border-bottom: none;
  color: var(--text);
}

.terminal-item .title:hover {
  color: var(--accent-hover);
  background-color: rgba(136, 192, 208, 0.10);
}

.badge {
  font-size: 0.72rem;
  background: var(--accent);
  color: #ECEFF4;
  padding: 2px 6px;
  border-radius: 3px;
  margin-left: 0.5rem;
  font-weight: 800;
}

@media (min-width: 600px) {
  .perms { display: inline-block; }
}

/* --- Code Blocks (Nord) --- */
div.highlight, pre {
  background: var(--code-bg) !important;
  color: var(--text) !important;
  padding: 1.25rem 1.25rem 1.1rem 1.25rem !important;
  border-radius: 10px !important;
  overflow-x: auto;
  position: relative !important;
  margin: 2rem 0 !important;
  border: 1px solid rgba(46, 52, 64, 0.10);
  box-shadow: 0 10px 22px rgba(46, 52, 64, 0.08);
}

@media (prefers-color-scheme: dark) {
  div.highlight, pre {
    border-color: rgba(236, 239, 244, 0.10);
    box-shadow: 0 12px 26px rgba(0,0,0,0.25);
  }
}

/* Avoid double border when highlight wrapper exists */
div.highlight pre {
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
}

/* Window controls */
div.highlight::before, pre::before {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  background-color: #BF616A; /* Aurora Red */
  border-radius: 50%;
  box-shadow:
    18px 0 0 #EBCB8B, /* Aurora Yellow */
    36px 0 0 #A3BE8C; /* Aurora Green */
  margin-bottom: 16px;
  opacity: 0.95;
}

/* Prevent duplicate dots on nested pre */
div.highlight pre::before { content: none !important; }

code {
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace !important;
  font-size: 0.92em;
}

p code, li code {
  background: rgba(136, 192, 208, 0.18) !important;
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

pre code {
  background: transparent !important;
  padding: 0 !important;
  color: inherit !important;
}
