@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap");

:root {
  --bg: #0a0a0a;
  --text: #e0e0e0;
  --muted: #c8c8c8;
  --accent: #00ff88;
  --divider: rgba(255, 255, 255, 0.1);
  --panel: #111111;
  --content-width: 900px;
  --side-padding: 32px;
  --space-6: 6px;
  --space-8: 8px;
  --space-10: 10px;
  --space-12: 12px;
  --space-16: 16px;
  --space-24: 24px;
  --space-32: 32px;
  --space-40: 40px;
  --space-48: 48px;
  --focus-ring: 2px solid #00ff88;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  line-height: 1.7;
}

body {
  overflow-x: hidden;
}

h1,
h2,
h3,
p,
ul {
  margin: 0;
}

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

button {
  all: unset;
  cursor: pointer;
}

input,
textarea {
  font: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--side-padding);
  top: 12px;
  z-index: 100;
  padding: 8px 12px;
  color: var(--accent);
  border: 1px solid var(--accent);
  background: var(--bg);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-shell {
  min-height: 100vh;
  background: var(--bg);
}

.container {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--side-padding);
}

.header-bar {
  padding-top: 24px;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--divider);
}

.header-path {
  color: var(--text);
  white-space: nowrap;
}

.cmd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  min-width: 140px;
  height: 44px;
  background: transparent !important;
  color: #00ff88 !important;
  border: 1px solid #00ff88;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  text-align: center;
  white-space: nowrap;
  padding: 0 14px;
}

.cmd-btn:hover {
  background: rgba(0, 255, 136, 0.08) !important;
}

.cmd-btn:focus-visible {
  outline: 2px solid #00ff88;
  outline-offset: 2px;
}

.nav-bar {
  padding-top: 16px;
}

.nav-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.nav-link {
  color: var(--accent);
  padding-bottom: 2px;
}

.nav-link[aria-current="page"] {
  color: #ffffff;
  border-bottom: 1px solid var(--accent);
}

.page-main {
  padding: 24px 0 120px;
}

.page-heading {
  color: var(--accent);
  margin-bottom: 24px;
}

.footer {
  padding: 24px 0 32px;
}

.footer-copy {
  border-top: 1px solid var(--divider);
  padding-top: 16px;
  color: var(--muted);
}

.terminal-screen {
  position: relative;
}

.terminal-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.03) 0,
    rgba(255, 255, 255, 0.03) 1px,
    transparent 1px,
    transparent 4px
  );
}

.terminal-main {
  position: relative;
  z-index: 1;
  padding: 24px 0 128px;
}

.terminal-output {
  white-space: normal;
  word-break: break-word;
}

.terminal-line {
  white-space: pre-wrap;
  min-height: 1.7em;
}

.boot-line + .boot-line {
  margin-top: 6px;
}

.boot-progress {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.boot-progress-bar {
  color: var(--accent);
}

.hero-block {
  margin-top: 40px;
}

.site-title {
  color: #ffffff;
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-transform: uppercase;
}

.site-subtitle {
  margin-top: 12px;
  color: var(--accent);
}

.section-divider {
  margin-top: 32px;
  border-top: 1px solid var(--divider);
}

.command-cluster {
  margin-top: 24px;
}

.command-intro {
  margin-bottom: 10px;
  color: var(--text);
}

.command-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
}

.terminal-inline-output {
  margin-top: 24px;
}

.terminal-output-block + .terminal-output-block {
  margin-top: 24px;
}

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

.input-bar {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  background: var(--bg);
  border-top: 1px solid var(--divider);
  padding: 12px 0;
  z-index: 50;
}

.input-bar .inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.terminal-input-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}

.terminal-input {
  width: 100%;
  border: none;
  background: transparent;
  color: transparent;
  caret-color: transparent;
  padding: 0;
  margin: 0;
  position: relative;
  z-index: 2;
}

.terminal-input:focus-visible {
  outline: none;
}

.input-mirror {
  position: absolute;
  inset: 0;
  color: var(--text);
  pointer-events: none;
}

.cursor {
  display: inline-block;
  width: 0.62ch;
  height: 1.1em;
  margin-left: 1px;
  vertical-align: -0.18em;
  background: var(--accent);
  animation: blink 1s steps(1, end) infinite;
}

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

.two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.terminal-panel {
  border-left: 2px solid var(--divider);
  padding-left: 16px;
}

.headshot-wrap {
  width: min(280px, 100%);
  aspect-ratio: 1;
  border: 2px solid var(--accent);
  border-radius: 999px;
  overflow: hidden;
  background: #111111;
}

.headshot-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  display: block;
}

.headshot-placeholder {
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
}

.education-list,
.timeline-list {
  margin-top: 24px;
}

.education-item + .education-item {
  margin-top: 16px;
}

.timeline-list {
  position: relative;
  display: grid;
  gap: 24px;
  border-left: 1px solid rgba(0, 255, 136, 0.3);
  padding-left: 24px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -27px;
  top: 0.5em;
  width: 4px;
  height: 4px;
  background: var(--accent);
}

.timeline-date {
  color: rgba(0, 255, 136, 0.82);
}

.timeline-company {
  color: var(--accent);
}

.timeline-location {
  color: var(--muted);
}

.timeline-bullets {
  margin-top: 8px;
  padding-left: 18px;
}

.timeline-bullets li + li {
  margin-top: 8px;
}

.project-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.filter-btn {
  width: auto;
  min-width: 0;
}

.filter-btn[aria-pressed="true"] {
  background: rgba(0, 255, 136, 0.12) !important;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.project-card {
  border-left: 2px solid transparent;
  padding-left: 16px;
  max-height: 900px;
  opacity: 1;
  transition: opacity 220ms ease, max-height 260ms ease, border-color 220ms ease;
}

.project-card.is-expanded {
  border-left-color: var(--accent);
}

.project-card.is-filtered-out {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  pointer-events: none;
  margin: 0;
}

.project-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111111;
  overflow: hidden;
  margin-bottom: 16px;
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.img-placeholder {
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: #111111;
  text-transform: lowercase;
  letter-spacing: 0.08em;
}

.project-title {
  color: #ffffff;
  font-size: 1.05rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.badge-pill {
  display: inline-flex;
  width: auto;
  min-width: 0;
  padding: 2px 8px;
  border: 1px solid rgba(240, 180, 41, 0.45);
  color: #f0b429;
  margin-bottom: 12px;
}

.tag-pill {
  color: var(--accent);
  border: 1px solid rgba(0, 255, 136, 0.3);
  padding: 2px 8px;
}

.muted-stack,
.project-summary,
.project-details-copy {
  color: var(--muted);
}

.muted-stack,
.project-summary,
.project-details-toggle {
  margin-top: 12px;
}

.project-details-panel {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 260ms ease, opacity 220ms ease;
}

.project-details-panel.is-open {
  max-height: 480px;
  opacity: 1;
  margin-top: 16px;
}

.project-details-link {
  display: inline-flex;
  width: auto;
  min-width: 0;
  margin-top: 12px;
}

.contact-lines {
  display: grid;
  gap: 12px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.skill-panel + .skill-panel {
  margin-top: 0;
}

.skill-panel-title {
  color: #ffffff;
  margin-bottom: 12px;
}

.skill-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 8px;
}

.contact-line {
  color: var(--text);
}

.contact-form {
  display: grid;
  gap: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
}

.form-prompt {
  color: var(--accent);
  white-space: nowrap;
}

.form-field,
.form-textarea {
  width: 100%;
  border: none;
  border-bottom: 1px solid rgba(0, 255, 136, 0.4);
  background: transparent;
  color: var(--text);
  padding: 0 0 8px;
}

.form-field:focus,
.form-textarea:focus {
  outline: none;
  border-bottom-color: var(--accent);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-success {
  color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .cursor {
    animation: none !important;
  }
}

@media (max-width: 900px) {
  .two-column,
  .projects-grid,
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 600px) {
  :root {
    --side-padding: 16px;
  }

  html,
  body {
    font-size: 12px;
  }

  .container {
    padding: 0 16px;
  }

  .input-bar .inner {
    padding: 0 16px;
  }

  .site-title {
    font-size: clamp(1.8rem, 8vw, 3rem);
  }

  .command-row {
    flex-wrap: wrap;
    gap: 8px;
  }

  .cmd-btn {
    width: auto;
    min-width: 0;
    padding: 8px 14px;
  }

  .header-row,
  .form-row {
    align-items: flex-start;
  }
}
