:root {
  color-scheme: dark;
  --bg: #0b0f0f;
  --surface: #101616;
  --surface-raised: #141b1a;
  --line: #26302e;
  --line-strong: #35413e;
  --text: #e5ebe8;
  --muted: #8d9994;
  --faint: #5f6a66;
  --signal: #76d7a5;
  --signal-dim: #163a2a;
  --link: #83c9e8;
  --warning: #d6b36a;
  --sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --page: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0 0 auto;
  height: 1px;
  background: var(--signal);
  content: "";
  opacity: 0.7;
  z-index: 100;
}

::selection {
  background: var(--signal);
  color: #07100b;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 200;
  padding: 0.6rem 0.9rem;
  background: var(--signal);
  color: #07100b;
  font-family: var(--mono);
  font-size: 0.8rem;
  transform: translateY(-160%);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(38, 48, 46, 0.9);
  background: rgba(11, 15, 15, 0.94);
  backdrop-filter: blur(12px);
}

.nav-shell {
  width: min(calc(100% - 2.5rem), var(--page));
  min-height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.brand .host {
  color: var(--signal);
}

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

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

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-family: var(--mono);
  font-size: 0.8rem;
}

.site-nav a {
  color: var(--muted);
  transition: color 160ms ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

.site-nav a[aria-current="page"]::before {
  color: var(--signal);
  content: "./";
}

.site-nav .external {
  color: var(--link);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  padding: 0.45rem 0.65rem;
  font-family: var(--mono);
  font-size: 0.75rem;
}

main {
  overflow: hidden;
}

.container {
  width: min(calc(100% - 2.5rem), var(--page));
  margin-inline: auto;
}

.hero {
  min-height: 680px;
  padding: 7.5rem 0 6rem;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
  align-items: center;
  gap: clamp(3rem, 7vw, 7rem);
}

.hero.compact {
  min-height: auto;
  padding: 7rem 0 5rem;
  align-items: end;
}

.command,
.section-command {
  margin: 0 0 1.4rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.01em;
}

.command::before,
.section-command::before {
  color: var(--signal);
  content: "$ ";
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(3.6rem, 8vw, 7.5rem);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 0.92;
}

.hero.compact h1 {
  font-size: clamp(3.3rem, 7vw, 6.4rem);
}

.role-line {
  margin: 1.4rem 0 0;
  color: var(--signal);
  font-family: var(--mono);
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.lede {
  max-width: 680px;
  margin: 2rem 0 0;
  color: #b6c0bc;
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  line-height: 1.55;
}

.actions {
  margin-top: 2.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  padding: 0.65rem 1rem;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.8rem;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.button::before {
  margin-right: 0.55rem;
  color: var(--signal);
  content: "[";
}

.button::after {
  margin-left: 0.55rem;
  color: var(--signal);
  content: "]";
}

.button:hover {
  border-color: var(--signal);
  background: var(--signal-dim);
}

.button.primary {
  border-color: var(--signal);
  background: var(--signal);
  color: #07100b;
  font-weight: 600;
}

.button.primary::before,
.button.primary::after {
  color: #07100b;
}

.terminal-panel {
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  box-shadow: 12px 12px 0 #070a0a;
}

.terminal-bar {
  min-height: 42px;
  border-bottom: 1px solid var(--line);
  padding: 0.75rem 1rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
}

.terminal-bar::before {
  margin-right: 0.7rem;
  color: var(--signal);
  content: ">";
}

.terminal-body {
  padding: 1.5rem;
}

.fact-list {
  margin: 0;
  display: grid;
  gap: 0.9rem;
  font-family: var(--mono);
  font-size: 0.78rem;
}

.fact-row {
  display: grid;
  grid-template-columns: 95px 1fr;
  gap: 1rem;
}

.fact-row dt {
  color: var(--faint);
}

.fact-row dd {
  margin: 0;
  color: #c6ceca;
}

.fact-row .ok {
  color: var(--signal);
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 0.55rem;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 4px rgba(118, 215, 165, 0.1);
}

.metrics {
  border-block: 1px solid var(--line);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.metric {
  min-height: 130px;
  padding: 1.6rem;
  border-right: 1px solid var(--line);
}

.metric:last-child {
  border-right: 0;
}

.metric strong {
  display: block;
  color: var(--text);
  font-family: var(--mono);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 400;
  line-height: 1;
}

.metric span {
  display: block;
  margin-top: 0.75rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.section {
  padding: 7rem 0;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section-head {
  margin-bottom: 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 2rem;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1;
}

.section-head > p:last-child {
  max-width: 540px;
  margin: 0;
  justify-self: end;
  color: var(--muted);
}

.module-grid {
  border-top: 1px solid var(--line-strong);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.module {
  min-height: 310px;
  padding: 2rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background 160ms ease;
}

.module:last-child {
  border-right: 0;
}

.module:hover {
  background: var(--surface);
}

.module-index {
  display: block;
  margin-bottom: 4rem;
  color: var(--signal);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.module h3 {
  margin: 0 0 1rem;
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 500;
}

.module p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.split {
  display: grid;
  grid-template-columns: minmax(240px, 0.35fr) minmax(0, 0.65fr);
  gap: clamp(3rem, 8vw, 8rem);
}

.sticky-label {
  position: sticky;
  top: 110px;
  align-self: start;
}

.sticky-label h2 {
  margin: 0 0 1rem;
  font-size: clamp(2.3rem, 5vw, 4rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1;
}

.sticky-label p {
  color: var(--muted);
}

.content-stack {
  display: grid;
  gap: 1.25rem;
}

.content-stack > .button {
  justify-self: start;
}

.role-card,
.project-card,
.note-card,
.stack-card {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface);
}

.role-card header,
.project-card header,
.stack-card header {
  border-bottom: 1px solid var(--line);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.75rem;
}

.role-card header span:last-child,
.project-card header span:last-child {
  color: var(--muted);
}

.role-content,
.project-content,
.stack-content {
  padding: 1.6rem;
}

.role-content h3,
.project-content h3 {
  margin: 0 0 0.25rem;
  font-size: 1.35rem;
  font-weight: 500;
}

.role-content .title {
  margin: 0 0 1.25rem;
  color: var(--signal);
  font-family: var(--mono);
  font-size: 0.8rem;
}

.role-content p,
.project-content p {
  margin: 0;
  color: var(--muted);
}

.note-card p {
  margin: 0;
}

.note-card p + p {
  margin-top: 1.25rem;
}

.log-list {
  margin: 1.4rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
  list-style: none;
}

.log-list li {
  position: relative;
  padding-left: 1.5rem;
  color: #b5bfbb;
}

.log-list li::before {
  position: absolute;
  left: 0;
  color: var(--signal);
  content: "+";
  font-family: var(--mono);
}

.private-note {
  margin-bottom: 2rem;
  border-left: 2px solid var(--warning);
  padding: 1rem 1.25rem;
  background: #15140f;
  color: #bcb8a9;
  font-size: 0.92rem;
}

.private-note strong {
  color: var(--warning);
  font-family: var(--mono);
  font-weight: 500;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.project-card {
  transition: border-color 160ms ease, transform 160ms ease;
}

.project-card:hover {
  border-color: var(--link);
  transform: translateY(-2px);
}

.project-card .arrow {
  color: var(--link);
}

.project-tags {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.7rem;
}

.career-log {
  position: relative;
  display: grid;
  gap: 3rem;
}

.career-log::before {
  position: absolute;
  top: 0.6rem;
  bottom: 0.6rem;
  left: 6px;
  width: 1px;
  background: var(--line-strong);
  content: "";
}

.career-entry {
  position: relative;
  padding-left: 2.5rem;
}

.career-entry::before {
  position: absolute;
  top: 0.55rem;
  left: 2px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--signal);
  border-radius: 50%;
  background: var(--bg);
  content: "";
}

.career-meta {
  color: var(--signal);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.career-entry h3 {
  margin: 0.5rem 0 0.25rem;
  font-size: 1.5rem;
  font-weight: 500;
}

.career-entry h4 {
  margin: 0 0 1rem;
  color: #b8c1bd;
  font-weight: 400;
}

.career-entry p {
  margin: 0;
  color: var(--muted);
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.stack-card header {
  color: var(--signal);
}

.token-list {
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  list-style: none;
}

.token-list li {
  border: 1px solid var(--line);
  padding: 0.45rem 0.65rem;
  color: #b7c0bc;
  font-family: var(--mono);
  font-size: 0.72rem;
}

.authorization {
  border: 1px solid var(--line-strong);
  padding: clamp(1.5rem, 5vw, 3rem);
  display: grid;
  grid-template-columns: 0.4fr 0.6fr;
  gap: 2rem;
  background: var(--surface);
}

.authorization h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.authorization p {
  margin: 0;
  color: var(--muted);
}

.contact-layout {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: clamp(3rem, 8vw, 7rem);
}

.contact-layout h2 {
  margin: 0 0 1rem;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1;
}

.contact-links {
  margin: 2rem 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.contact-links a {
  min-height: 58px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #bcc5c1;
  font-family: var(--mono);
  font-size: 0.8rem;
}

.contact-links a:hover {
  color: var(--link);
}

.contact-links .label {
  color: var(--faint);
}

.contact-form {
  border: 1px solid var(--line-strong);
  background: var(--surface);
}

.form-body {
  padding: clamp(1.4rem, 4vw, 2.5rem);
  display: grid;
  gap: 1.25rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.5rem;
}

.field label {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
}

.field label::before {
  color: var(--signal);
  content: "--";
  margin-right: 0.4rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 2px;
  outline: 0;
  background: #0d1212;
  color: var(--text);
  padding: 0.8rem 0.9rem;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--signal);
  box-shadow: 0 0 0 2px rgba(118, 215, 165, 0.1);
}

.field textarea {
  min-height: 160px;
  resize: vertical;
}

.form-note {
  margin: 0;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.68rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0;
}

.footer-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}

.footer-links a:hover {
  color: var(--link);
}

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

.signal {
  color: var(--signal);
}

.link {
  color: var(--link);
}

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .hero,
  .hero.compact,
  .section-head,
  .split,
  .authorization,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 6rem;
  }

  .hero-aside {
    max-width: 580px;
  }

  .section-head > p:last-child {
    justify-self: start;
  }

  .module-grid {
    grid-template-columns: 1fr;
  }

  .module {
    min-height: auto;
    border-right: 0;
  }

  .module-index {
    margin-bottom: 2rem;
  }

  .sticky-label {
    position: static;
  }

}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  .nav-shell {
    min-height: 62px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 62px;
    left: 0;
    right: 0;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
    padding: 1.25rem;
    display: none;
    align-items: stretch;
    flex-direction: column;
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    min-height: 38px;
    display: flex;
    align-items: center;
  }

  .hero,
  .hero.compact {
    padding: 5rem 0 4rem;
  }

  .hero h1 {
    font-size: clamp(3.25rem, 17vw, 5rem);
  }

  .section {
    padding: 5rem 0;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .metric:nth-child(2) {
    border-right: 0;
  }

  .metric:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .project-grid,
  .stack-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .terminal-panel {
    box-shadow: 7px 7px 0 #070a0a;
  }

  .fact-row {
    grid-template-columns: 80px 1fr;
  }

  .footer-shell {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

/* showreel ---------------------------------------------------------------- */

.reel-section {
  padding-top: 0;
}

.reel {
  margin: 3rem 0 0;
  overflow: hidden;
}

.reel-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.reel-bar .reel-meta {
  margin-left: auto;
  color: var(--faint);
}

.reel-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #060a09;
  overflow: hidden;
}

.reel-stage video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.reel-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  background: radial-gradient(circle at 50% 50%, rgba(11, 15, 15, 0.25), rgba(6, 10, 9, 0.82));
  color: var(--text);
  cursor: pointer;
  transition: opacity 240ms ease, visibility 240ms ease;
}

.reel.is-playing .reel-cover {
  opacity: 0;
  visibility: hidden;
}

/* While buffering the cover stays up, so a tap is never aimed at a control
   that is about to change meaning underneath it. */
.reel.is-buffering .reel-cover {
  opacity: 1;
  visibility: visible;
}

.reel.is-buffering .reel-cover .glyph {
  animation: reel-pulse 1.1s ease-in-out infinite;
}

@keyframes reel-pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

.reel-cover-inner {
  display: grid;
  justify-items: center;
  gap: 1rem;
}

.reel-cover .glyph {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border: 1px solid var(--signal);
  border-radius: 50%;
  background: rgba(11, 15, 15, 0.6);
  color: var(--signal);
  font-size: 1.5rem;
  line-height: 1;
  transition: background 160ms ease, transform 160ms ease;
}

.reel-cover:hover .glyph {
  background: var(--signal-dim);
  transform: scale(1.05);
}

.reel-cover .label {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.reel-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding: 0.75rem 1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
}

.reel-btn {
  min-width: 68px;
  min-height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: transparent;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.72rem;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.reel-btn:hover {
  border-color: var(--signal);
  background: var(--signal-dim);
}

.reel-track {
  position: relative;
  flex: 1;
  height: 22px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.reel-track::before {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--line-strong);
  content: "";
  transform: translateY(-50%);
}

.reel-track span {
  position: absolute;
  top: 50%;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--signal);
  transform: translateY(-50%);
}

.reel-track span::after {
  position: absolute;
  top: 50%;
  right: -3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  content: "";
  transform: translateY(-50%);
}

.reel-time {
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.reel-chapters {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.reel-chapters li {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.reel-chapters li:nth-child(4n) {
  border-right: 0;
}

.reel-chapters li:nth-child(n + 5) {
  border-bottom: 0;
}

.reel-chapters button {
  width: 100%;
  min-height: 62px;
  display: grid;
  gap: 0.35rem;
  border: 0;
  padding: 0.85rem 1rem;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.reel-chapters button:hover {
  background: var(--surface-raised);
  color: var(--text);
}

.reel-chapters button .at {
  color: var(--faint);
  font-size: 0.66rem;
}

.reel-chapters li.active button {
  background: var(--signal-dim);
  color: var(--signal);
}

.reel-chapters li.active button .at {
  color: var(--signal);
}

.reel-caption {
  margin: 1rem 0 0;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.72rem;
}

@media (max-width: 900px) {
  .reel-chapters {
    grid-template-columns: repeat(2, 1fr);
  }

  .reel-chapters li:nth-child(2n) {
    border-right: 0;
  }

  .reel-chapters li:nth-child(n + 5) {
    border-bottom: 1px solid var(--line);
  }

  .reel-chapters li:nth-last-child(-n + 2) {
    border-bottom: 0;
  }
}

@media (max-width: 720px) {
  .reel-cover .glyph {
    width: 62px;
    height: 62px;
    font-size: 1.15rem;
  }

  .reel-controls {
    flex-wrap: wrap;
  }

  .reel-track {
    order: 3;
    flex-basis: 100%;
  }
}
