/* resumere — single stylesheet. Theme via CSS custom properties keyed off
   [data-theme]; IBM Plex Mono self-hosted (no CDN). */

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/IBMPlexMono-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/IBMPlexMono-Medium.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/IBMPlexMono-SemiBold.woff2") format("woff2");
}

:root {
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --maxw: 56rem;
}

/* Dark is the default theme. */
[data-theme="dark"] {
  --bg: #0d1117;
  --bg-elev: #161b22;
  --fg: #d7dde5;
  --fg-dim: #8b949e;
  --accent: #2e75b6;     /* the CV's blue */
  --accent-2: #3fb950;   /* terminal green */
  --border: #283039;
  --shadow: rgba(0, 0, 0, 0.5);
  --term-bar: #2b2b2b;   /* GNOME-terminal header bar */
  --term-bg: #1b1b1b;    /* terminal screen, slightly off the page bg */
}
[data-theme="light"] {
  --bg: #f6f8fa;
  --bg-elev: #ffffff;
  --fg: #1f2328;
  --fg-dim: #57606a;
  --accent: #1f5e96;
  --accent-2: #1a7f37;
  --border: #d0d7de;
  --shadow: rgba(140, 149, 159, 0.2);
  --term-bar: #dcdad5;   /* GNOME-terminal header bar (light) */
  --term-bg: #ffffff;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header / nav */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elev);
}
.brand { font-weight: 600; font-size: 1.05rem; color: var(--fg); }
.brand-accent { color: var(--accent); }
.site-nav { display: flex; align-items: center; gap: 1.25rem; }
.site-nav a { color: var(--fg-dim); }
.site-nav a.active, .site-nav a:hover { color: var(--fg); text-decoration: none; }

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg-dim);
  border-radius: 6px;
  width: 2.1rem;
  height: 2.1rem;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1;
}
.theme-toggle:hover { color: var(--fg); border-color: var(--accent); }

/* Main / prose */
.site-main {
  flex: 1;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}
.prose h1 { font-size: 1.6rem; margin: 1.5rem 0 0.75rem; }
.prose h2 { font-size: 1.15rem; margin: 2rem 0 0.5rem; color: var(--accent); }
.prose p { margin: 0.6rem 0; }
.prose ul { margin: 0.4rem 0 1rem; padding-left: 1.2rem; }
.prose li { margin: 0.3rem 0; }
.skills li, .projects li { list-style: square; }
.cv-link { margin-top: 2rem; color: var(--fg-dim); }
.contact { color: var(--fg-dim); font-size: 0.85rem; margin: 0.2rem 0 1.2rem; }
.contact a { color: var(--accent); }
.contact span[aria-hidden] { padding: 0 0.15rem; }

/* Experience roles */
.role { margin: 1.5rem 0; padding-bottom: 1rem; border-bottom: 1px dashed var(--border); }
.role header { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.role h2 { margin: 0.5rem 0 0; color: var(--fg); }
.role .role-kind { color: var(--fg-dim); font-weight: 400; font-size: 0.9rem; }
.role .dates { color: var(--fg-dim); font-size: 0.85rem; white-space: nowrap; }
.role .title { color: var(--accent); margin: 0.15rem 0 0.5rem; font-weight: 500; }
.earlier li { color: var(--fg-dim); }

/* Terminal panel — a Linux terminal (GNOME-style), not a macOS window:
   squared-off, flat, window controls on the RIGHT, no traffic-light dots. */
.terminal {
  background: var(--term-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem 0.4rem 0.8rem;
  background: var(--term-bar);
  border-bottom: 1px solid var(--border);
}
.terminal-title { color: var(--fg-dim); font-size: 0.8rem; }
/* GNOME/KDE-style window controls: square glyphs, pinned to the right. */
.terminal-controls { margin-left: auto; display: flex; gap: 0.15rem; }
.terminal-controls .win {
  width: 1.3rem;
  height: 1.3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-dim);
  font-size: 0.7rem;
  border-radius: 3px;
  line-height: 1;
}
.terminal-body { padding: 0.9rem 1.1rem; }
/* The prompt line above the output: `bob@resumere:~$ cat about.txt`. */
.terminal-cmd { margin: 0 0 0.4rem; font-size: 0.95rem; color: var(--fg-dim); }
.term-prompt { color: var(--accent-2); font-weight: 500; }
.terminal-output {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--font-mono);
  color: var(--accent-2);
  font-size: 0.95rem;
  line-height: 1.6;
}
/* Blinking cursor used by terminal.js while typing. */
.terminal-output .cursor {
  display: inline-block;
  width: 0.6ch;
  background: var(--accent-2);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* Footer */
.site-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--fg-dim);
  font-size: 0.8rem;
  background: var(--bg-elev);
}
.site-footer .version { margin-left: auto; }

@media (max-width: 640px) {
  .site-footer .version { margin-left: 0; }
  .role header { flex-direction: column; }
}
