:root {
  --bg: #0a0e18;
  --fg: #c6cede;
  --fg-dim: #7d879f;
  --border: #1c2438;
  --accent: #6d8dff;
  --name: #93a7dd;
  --grad: linear-gradient(120deg, #4f7cff 0%, #8b5cf6 55%, #22d3ee 100%);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  line-height: 1.7;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(rgba(109, 141, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(109, 141, 255, 0.025) 1px, transparent 1px);
  background-size: 32px 32px, 32px 32px;
}

::selection {
  background: rgba(109, 141, 255, 0.3);
  color: #fff;
}

.site-header {
  position: sticky;
  top: 0;
  background: rgba(10, 14, 24, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

.site-header nav {
  max-width: 900px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.logo {
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
}

.logo:hover,
.logo:focus-visible {
  color: var(--accent);
}

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

.nav-links a {
  color: var(--fg-dim);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--accent);
}

.verb {
  color: var(--fg-dim);
  opacity: 0.6;
}

a:hover .verb,
a:focus-visible .verb {
  opacity: 1;
}

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 4.5rem 0;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 4.5rem;
}

section:last-of-type {
  border-bottom: none;
}

h1 {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  color: var(--name);
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  min-height: 1.2em;
}

h2 {
  color: var(--fg);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 2.5rem 0 1.25rem;
  scroll-margin-top: 4.5rem;
}

section h2:first-of-type {
  margin-top: 1.5rem;
}

.comment {
  color: var(--fg-dim);
  margin-right: 0.5rem;
}

.kicker {
  font-size: 0.9rem;
  color: var(--fg);
  margin-bottom: 0.75rem;
}

.prompt-path {
  color: var(--accent);
}

.prompt-sep {
  color: var(--fg-dim);
  margin-right: 0.5rem;
}

.hero {
  min-height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 1rem;
}

.avatar-ring {
  width: 168px;
  height: 168px;
  border-radius: 50%;
  padding: 3px;
  background: var(--grad);
  box-shadow: 0 0 10px rgba(79, 124, 255, 0.15);
}

.hero-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.cursor {
  display: inline-block;
  width: 0.05em;
  height: 1em;
  margin-left: 0.1em;
  background: white;
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

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

.tagline {
  color: var(--fg-dim);
  font-size: 1rem;
  max-width: 560px;
}

.cta {
  display: inline-block;
  margin: 1rem 0 0.5rem;
  padding: 0.65rem 1.4rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--fg-dim);
  font-family: var(--mono);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}

.cta:hover,
.cta:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.muted {
  color: var(--fg-dim);
  font-size: 0.92rem;
}

.skill-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.skill-tags li {
  font-size: 0.8rem;
  color: var(--fg-dim);
}

.page-list,
.contact-links,
.ls-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-top: 0.5rem;
  overflow-x: auto;
}

.ls-row {
  display: grid;
  grid-template-columns: 7.5rem 1.5rem 6.5rem 8.5rem 1fr;
  gap: 0.5rem;
  padding: 0.15rem 0;
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
}

.ls-perms,
.ls-size,
.ls-user,
.ls-date {
  color: var(--fg-dim);
}

.ls-name {
  color: var(--accent);
}

.ls-row:hover .ls-name,
.ls-row:focus-visible .ls-name {
  text-decoration: underline;
}

.ls-row:hover {
  background: rgba(109, 141, 255, 0.06);
}

@media (max-width: 640px) {
  .ls-row {
    grid-template-columns: 1fr auto;
  }

  .ls-perms,
  .ls-size,
  .ls-user,
  .ls-date {
    display: none;
  }
}

.resource-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.page-list a,
.contact-links a,
.resource-list a {
  color: var(--accent);
  text-decoration: none;
}

.page-list a:hover,
.page-list a:focus-visible,
.contact-links a:hover,
.contact-links a:focus-visible,
.resource-list a:hover,
.resource-list a:focus-visible {
  text-decoration: underline;
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.project h3 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.entry-name {
  color: var(--accent);
}

.entry-meta {
  color: var(--fg-dim);
  font-weight: 400;
  font-size: 0.85rem;
}

.project p {
  color: var(--fg-dim);
  font-size: 0.92rem;
  max-width: 640px;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.activity h3 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.activity p {
  color: var(--fg-dim);
  font-size: 0.92rem;
  max-width: 640px;
}

.contact-links .verb {
  opacity: 0.6;
}

.pdf-viewer {
  margin-top: 0.5rem;
}

.pdf-page {
  display: block;
  margin: 0 auto 1.25rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  max-width: 100%;
}

.pdf-fallback {
  color: var(--fg-dim);
  border: 1px dashed var(--border);
  border-radius: 6px;
  padding: 1.5rem;
  text-align: center;
}

.pdf-fallback a {
  color: var(--accent);
}

.error-code {
  color: var(--fg-dim);
}

.error-text {
  color: var(--name);
}

footer {
  text-align: center;
  color: var(--fg-dim);
  font-size: 0.85rem;
  padding: 2rem 1rem;
}

.fade {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .fade {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 560px) {
  section {
    padding: 3rem 0;
  }

  .site-header nav {
    justify-content: center;
  }

  .hero {
    min-height: 70vh;
  }
}
