/* ============================================================
   Austin Conn — resume site theme
   Blue/grey terminal aesthetic, matching austinconn.org branding
   ============================================================ */

:root {
  --bg: #0a0e14;
  --bg-panel: #10161f;
  --bg-panel-alt: #0d1219;
  --border: #223247;
  --border-soft: #182333;
  --accent: #5ab0ff;
  --accent-dim: #2f6ea3;
  --text-bright: #e9eef4;
  --text: #b6c2d1;
  --text-muted: #64758a;
  --danger: #ff7b7b;
  --font-mono: ui-monospace, "JetBrains Mono", "SF Mono", Consolas,
    "Liberation Mono", Menlo, monospace;
  --max-width: 900px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  /* reserve scrollbar space so switching between short/tall pages doesn't
     shift page width and jitter mid-transition */
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.6;
  position: relative;
}

/* subtle scanline texture */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(90, 176, 255, 0.015) 0px,
    rgba(90, 176, 255, 0.015) 1px,
    transparent 1px,
    transparent 3px
  );
  z-index: 1;
}

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

.crt {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
  position: relative;
  z-index: 2;
}

/* ---------- terminal window chrome ---------- */

.term-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding: 0.6rem 1rem;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
}

.term-dots {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}
.term-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
  background: var(--border);
}
.term-dots span:nth-child(1) { background: #ff5f56; }
.term-dots span:nth-child(2) { background: #ffbd2e; }
.term-dots span:nth-child(3) { background: #27c93f; }

.term-title {
  color: var(--text-muted);
  font-size: 0.85rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.term-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 0.9rem;
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
  border-top: 1px solid var(--border-soft);
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
}
.nav-prompt {
  color: var(--accent);
  white-space: nowrap;
  margin-right: 0.15rem;
}
.term-nav a {
  color: var(--text-muted);
  white-space: nowrap;
}
.term-nav a:hover,
.term-nav a.active {
  color: var(--accent);
  text-decoration: none;
}
.term-nav a.active {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.term-body {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 8px 8px;
  padding: 2rem 1.75rem;
}

.term-footer {
  margin-top: 1.25rem;
  padding: 0 0.25rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ---------- blinking cursor ---------- */

.cursor {
  display: inline-block;
  width: 0.55em;
  height: 1.05em;
  background: var(--accent);
  vertical-align: text-bottom;
  margin-left: 0.15em;
  animation: blink 1s steps(1) infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .cursor,
  .typed {
    animation: none !important;
  }
}

/* ---------- hero / landing page ---------- */

.hero {
  padding: 1.5rem 0 2.5rem;
}
.hero-line {
  color: var(--text-muted);
  margin: 0 0 0.75rem;
}
.hero-line .prompt { color: var(--accent); }
.hero-line .path { color: var(--text-bright); }

.hero-name {
  font-size: 2rem;
  color: var(--text-bright);
  margin: 0 0 0.75rem;
  letter-spacing: -0.01em;
}

.hero-tagline {
  font-size: 1.05rem;
  color: var(--accent);
  margin: 0 0 1rem;
  min-height: 1.6em;
}

.hero-sub {
  color: var(--text-muted);
  margin: 0;
}

.menu-hint {
  color: var(--text-muted);
  margin: 0 0 0.75rem;
}

.menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.menu-list li {
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  margin-bottom: 0.5rem;
}
.menu-list a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text);
}
.menu-list a:hover {
  background: var(--bg-panel-alt);
  text-decoration: none;
  border-color: var(--accent-dim);
}
.menu-list .prompt-inline {
  color: var(--accent);
  margin-right: 0.4rem;
}
.menu-list .hint {
  color: var(--text-muted);
}

/* ---------- resume content ---------- */

.resume {
  position: relative;
  padding-top: 0.9rem;
}
.resume::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-dim) 60%, transparent);
  border-radius: 3px;
}

.resume-header {
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 0.9rem;
  margin-bottom: 0.5rem;
}
.resume-header h1 {
  color: var(--text-bright);
  font-size: 1.75rem;
  margin: 0 0 0.35rem;
}
.print-command {
  /* only rendered in print/PDF — see print.css */
  display: none;
}
.resume-tagline {
  color: var(--text-muted);
  margin: 0 0 0.9rem;
  font-size: 0.9rem;
}

.contact-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  padding: 0;
  margin: 0 0 0.6rem;
  font-size: 0.88rem;
  color: var(--text);
}

.clearance {
  color: var(--accent);
  font-size: 0.88rem;
  margin: 0 0 0.6rem;
}

.variant-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  background: linear-gradient(90deg, rgba(90, 176, 255, 0.16), transparent 85%);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  padding: 0.55rem 0.9rem;
  margin: 1.25rem 0 0;
  font-size: 0.82rem;
}
.variant-banner-label {
  color: var(--text-bright);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.variant-banner-link {
  color: var(--accent);
  white-space: nowrap;
}
.variant-banner-link:hover {
  text-decoration: underline;
}

.print-btn {
  display: inline-block;
  font-family: var(--font-mono);
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  cursor: pointer;
  margin: 1.25rem 0 1.75rem;
  text-decoration: none;
}
.print-btn:hover {
  background: var(--accent-dim);
  color: var(--text-bright);
  text-decoration: none;
}

.resume-section {
  margin: 2rem 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-soft);
}
.resume-section:first-of-type {
  border-top: none;
  padding-top: 0;
}
.resume-section h2 {
  display: inline-block;
  color: var(--text-bright);
  background: linear-gradient(90deg, rgba(90, 176, 255, 0.22), rgba(90, 176, 255, 0.02) 90%);
  border-left: 3px solid var(--accent);
  border-radius: 3px;
  padding: 0.3rem 0.7rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin: 0 0 1rem;
}
.resume-section h2::before {
  content: "## ";
  color: var(--accent);
}

.employer h3,
.education-entry h3,
.project-entry h3 {
  color: var(--text-bright);
  font-size: 1rem;
  margin: 0 0 0.25rem;
}
.employer .location,
.education-entry .location,
.project-entry .location {
  color: var(--text-muted);
  font-weight: normal;
  font-size: 0.85rem;
}
.employer .note {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-style: italic;
  margin: 0 0 0.75rem;
}
.job {
  margin: 0.5rem 0 1.1rem;
}
.job h4 {
  color: var(--text);
  font-size: 0.92rem;
  margin: 0 0 0.4rem;
}
.job .dates {
  color: var(--text-muted);
  font-weight: normal;
  font-size: 0.82rem;
}
.job ul,
.education-entry ul {
  margin: 0;
  padding-left: 1.25rem;
}
.job li,
.education-entry li {
  margin-bottom: 0.35rem;
}

.skills {
  list-style: none;
  margin: 0;
  padding: 0;
}
.skill-group {
  font-size: 0.88rem;
  margin-bottom: 0.55rem;
  line-height: 1.55;
}
.skill-group strong {
  color: var(--text-bright);
}

.project-entry {
  margin-bottom: 1.25rem;
}
.project-entry p {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
}
.project-entry .links {
  margin: 0.4rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.print-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-soft);
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ---------- 404 ---------- */

.not-found {
  padding: 1.5rem 0;
}
.not-found .error-code {
  color: var(--danger);
}

/* ---------- responsive ---------- */

@media (max-width: 640px) {
  .term-title {
    display: none;
  }
}

/* ---------- page transitions ----------
   terminal.js intercepts internal nav clicks, fetches the target page, and
   swaps #term-body in place — one document, no full reloads. These classes
   drive that swap animation. The @view-transition rule below is a fallback
   for when JS is unavailable/a link opens a real navigation (e.g. reload,
   typed URL): unsupported browsers just do a normal navigation either way. */

@keyframes term-body-out {
  to { opacity: 0; transform: translateY(-8px); }
}
@keyframes term-body-in {
  from { opacity: 0; transform: translateY(8px); }
}

#term-body.swap-out,
#term-body.swap-in {
  will-change: opacity, transform;
}
#term-body.swap-out {
  animation: term-body-out 0.16s ease-in both;
}
#term-body.swap-in {
  animation: term-body-in 0.22s ease-out both;
}

@view-transition {
  navigation: auto;
}

.term-bar { view-transition-name: term-bar; }
.term-nav { view-transition-name: term-nav; }
.term-body { view-transition-name: term-body; }
.term-footer { view-transition-name: term-footer; }

::view-transition-group(term-body) {
  animation-duration: 0.22s;
}
::view-transition-old(term-body) {
  animation: term-body-out 0.22s ease-in both;
}
::view-transition-new(term-body) {
  animation: term-body-in 0.22s ease-out both;
}

@media (prefers-reduced-motion: reduce) {
  #term-body.swap-out,
  #term-body.swap-in,
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}
