/* Theme: matches joshrnoll.com (Tokyo Night palette + JetBrains Mono) */

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("./fonts/jetbrains-mono-latin-700-normal.woff2") format("woff2");
}

:root {
  --bg: #1a1b26;
  --bg-dark: #16161e;
  --fg: #c0caf5;
  --comment: #565f89;
  --blue: #7aa2f7;
  --cyan: #7dcfff;
  --green: #9ece6a;
  --yellow: #e0af68;
  --orange: #ff9e64;
  --magenta: #bb9af7;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;
}

/* Global */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.6;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  padding-bottom: 4rem; /* room for the fixed status bar */
}

a {
  color: var(--blue);
  text-decoration: none;
}

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

::selection {
  background: var(--blue);
  color: var(--bg);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Nav bar (mirrors the site's NavBar component) */

.navbar {
  background: var(--bg-dark);
  border-bottom: 1px solid var(--comment);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.brand {
  color: var(--green);
  font-weight: 700;
  font-size: 1rem;
}

.brand:hover {
  color: var(--cyan);
  text-decoration: none;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  list-style: none;
}

.nav-link {
  color: var(--comment);
  font-size: 0.9rem;
}

.nav-link:hover {
  color: var(--fg);
  text-decoration: none;
}

.nav-link.active {
  color: var(--cyan);
}

/* Page layout */

.resume {
  padding-top: 3rem;
  padding-bottom: 4rem;
}

.resume section {
  margin-bottom: 2.5rem;
}

h1 {
  color: var(--fg);
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 1.25rem;
}

h2 {
  color: var(--fg);
  font-size: 1.4rem;
  line-height: 1.3;
  border-left: 3px solid var(--blue);
  padding-left: 0.75rem;
  margin-bottom: 1rem;
}

h3 {
  color: var(--fg);
  font-size: 1.1rem;
  line-height: 1.3;
  border-left: 3px solid var(--magenta);
  padding-left: 0.75rem;
}

h4 {
  color: var(--comment);
  font-size: 0.85rem;
  font-weight: 400;
  padding-left: calc(0.75rem + 3px);
  margin-top: 0.25rem;
}

p {
  color: var(--fg);
}

ul {
  padding-left: 1.5rem;
  margin: 0.75rem 0;
}

li {
  margin: 0.4rem 0;
}

li::marker {
  color: var(--comment);
}

/* Header buttons (match the site's hero CTA buttons) */

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cta {
  display: inline-block;
  color: var(--green);
  border: 1px solid var(--green);
  padding: 0.4em 1em;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: background 0.15s;
}

.cta:hover {
  background: color-mix(in srgb, var(--green) 15%, transparent);
  color: var(--green);
  text-decoration: none;
}

.cta--pdf {
  color: var(--blue);
  border-color: var(--blue);
  margin-top: 0.75rem;
}

.cta--pdf:hover {
  background: color-mix(in srgb, var(--blue) 15%, transparent);
  color: var(--blue);
}

/* Badges (match the site's project stack badges) */

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.stack-badge,
.cert-badge {
  border: 1px solid var(--comment);
  color: var(--comment);
  font-size: 0.8rem;
  padding: 0.1em 0.5em;
  border-radius: 3px;
}

.cert-badge {
  border-color: var(--blue);
}

.cert-badge a:hover {
  text-decoration: none;
}

.cert-badge:hover {
  background: color-mix(in srgb, var(--blue) 15%, transparent);
}

/* Experience / volunteering entries: plain, no card box */
.entry {
  margin-bottom: 2rem;
}

.entry:last-child {
  margin-bottom: 0;
}

.entry ul {
  margin-bottom: 0;
}

/* Projects / education */

#projects strong a {
  color: var(--blue);
}

#projects span {
  color: var(--fg);
}

#education ul {
  list-style: none;
  padding-left: 0;
}

#education li {
  margin-bottom: 1rem;
}

/* Status bar footer (mirrors the site's Neovim-style StatusBar) */

.statusbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  min-height: 1.75rem;
  background: var(--bg-dark);
  border-top: 1px solid var(--comment);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.25rem 1rem;
  font-size: 0.8rem;
  z-index: 200;
  font-family: var(--font-mono);
}

.mode-label {
  background: var(--yellow);
  color: var(--bg-dark);
  font-weight: 700;
  padding: 0 8px;
  height: 100%;
  display: flex;
  align-items: center;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.branch,
.scroll-pct {
  color: var(--comment);
}

.statusbar .path {
  color: var(--fg);
  flex: 1;
  word-break: break-all;
}

.scroll-pct {
  margin-left: auto;
}

/* Small screens */

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
}

@media (max-width: 600px) {
  .brand {
    display: none;
  }

  .nav-links {
    gap: 0.4rem 0.9rem;
  }

  .nav-link {
    font-size: 0.8rem;
  }
}

/* Neovim intro (ported from the site's landing-page TypingAnimation) */

.nvim-wrap {
  display: none;
}

html.nvim-intro .nvim-wrap {
  display: block;
  transition: opacity 0.25s ease;
}

.nvim-wrap.fading-out {
  opacity: 0;
}

.nvim-frame {
  background: var(--bg-dark);
  border: 1px solid var(--comment);
  border-radius: 6px;
  overflow: hidden;
  max-width: 820px;
  font-size: 0.95rem;
}

.nvim-content {
  position: relative;
  box-sizing: border-box;
  padding: 0;
  /* transparent borders instead of padding so scrolled lines never peek into the gutter */
  border-top: 0.5rem solid transparent;
  border-bottom: 0.5rem solid transparent;
  height: calc(18 * 1.7em + 1rem);
  overflow: hidden;
}

.nvim-line {
  display: flex;
  padding: 0 0.75rem;
  line-height: 1.7;
}

.nvim-line.active {
  background: color-mix(in srgb, var(--blue) 8%, transparent);
}

.nvim-line.active .lc::after {
  content: "█";
  color: var(--blue);
  animation: nvim-blink 1s step-end infinite;
}

.ln {
  color: var(--comment);
  min-width: 1.75em;
  text-align: right;
  margin-right: 1.25em;
  user-select: none;
  flex-shrink: 0;
}

/* Neovim-style `nowrap`: long lines run off the right edge */
.lc {
  color: var(--fg);
  flex: 1;
  min-width: 0;
  min-height: 1.7em;
  white-space: pre;
  overflow: hidden;
  text-overflow: clip;
}

.lc.k-dim { color: var(--comment); }
.lc.k-h1, .lc.k-h2 { color: var(--blue); font-weight: 700; }
.lc.k-h3 { color: var(--magenta); }
.lc.k-links { color: var(--cyan); }

.nvim-statusbar {
  background: color-mix(in srgb, var(--comment) 30%, var(--bg-dark));
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.2rem 0.75rem;
  font-size: 0.8rem;
}

.nvim-mode {
  background: var(--yellow);
  color: var(--bg-dark);
  font-weight: 700;
  padding: 0 6px;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.nvim-mode.insert { background: var(--green); }
.nvim-file { color: var(--fg); }
.nvim-pos { color: var(--comment); margin-left: auto; }
.nvim-keys { color: var(--orange); font-weight: 700; min-width: 3em; text-align: right; }
.nvim-keys.msg { color: var(--fg); font-weight: 400; }

.nvim-skip {
  margin-top: 0.75rem;
  background: none;
  border: none;
  color: var(--comment);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}

.nvim-skip:hover { color: var(--fg); }

@keyframes nvim-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Rendered resume: hidden visually during the intro but kept in the
   accessibility tree (no display:none / visibility:hidden). */
html.nvim-intro .md-preview {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
}

.md-preview {
  transition: opacity 0.3s ease;
}

.md-preview.visible {
  opacity: 1;
}

@media (max-width: 600px) {
  .nvim-frame { font-size: 0.8rem; }
  .nvim-content { height: calc(20 * 1.7em + 1rem); }
  .nvim-statusbar { gap: 0.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  .nvim-wrap { display: none !important; }
  html.nvim-intro .md-preview { opacity: 1; max-height: none; }
}
