:root {
  --bg: #080808;
  --panel: #0d0d0d;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.2);
  --text: #ffffff;
  --muted: #a0a0a0;
  --dim: rgba(255, 255, 255, 0.6);
  --accent: #5eead4;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
  scroll-padding-top: 0;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  opacity: 1;
  scroll-snap-type: y proximity;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  content: "";
  border-left: 1px solid rgba(255, 255, 255, 0.035);
  border-right: 1px solid rgba(255, 255, 255, 0.026);
  width: min(100% - 48px, 1280px);
  margin: 0 auto;
}

body::after {
  position: fixed;
  inset: 12px;
  z-index: 1;
  pointer-events: none;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.035);
}

::selection {
  background: rgba(94, 234, 212, 0.24);
  color: var(--text);
}

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

a:focus-visible,
button:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 4px;
}

.background {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--bg);
  pointer-events: none;
}

.background-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(2px) brightness(58%) saturate(46%) contrast(108%);
  transform: scale(1.015);
}

.background-overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 8, 0.44);
}

.system-rail {
  position: fixed;
  left: 28px;
  bottom: 32px;
  z-index: 19;
  display: grid;
  gap: 10px;
  color: rgba(255, 255, 255, 0.34);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  pointer-events: none;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px clamp(24px, 5vw, 72px);
  color: rgba(255, 255, 255, 0.78);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0;
}

main,
.terminal-footer {
  position: relative;
  z-index: 2;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  background: rgba(8, 8, 8, 0.72);
  color: var(--text);
  font-weight: 600;
  transition: border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.brand-mark:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.site-nav {
  display: flex;
  gap: clamp(16px, 2.4vw, 28px);
  align-items: center;
}

.site-nav a {
  position: relative;
  padding: 4px 0;
  transition: color 180ms ease;
}

.site-nav a::after {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  content: "";
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 220ms ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--accent);
}

.site-nav a:hover::after,
.site-nav a.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 112px clamp(24px, 5vw, 72px);
  scroll-margin-top: 72px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.section-inner {
  width: min(100%, 1180px);
  margin: 0 auto;
}

.hero .section-inner,
.section-inner.narrow {
  margin-left: clamp(0px, 7vw, 96px);
  margin-right: auto;
}

.narrow {
  max-width: 760px;
}

.hero {
  align-items: center;
}

.hero-inner {
  max-width: 1040px;
  padding-top: 24px;
}

.eyebrow,
.section-kicker,
.prompt {
  margin: 0 0 22px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.2;
}

h1,
h2 {
  margin: 0;
  font-family: var(--mono);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: 0;
}

h1 {
  max-width: 1060px;
  font-size: 8.8rem;
  text-transform: uppercase;
}

h2 {
  font-size: 5.2rem;
}

.statement {
  display: grid;
  gap: 2px;
  margin-top: 30px;
  color: rgba(255, 255, 255, 0.94);
  font-family: var(--mono);
  font-size: 1.75rem;
  line-height: 1.35;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.52);
}

.hero-meta span {
  border: 1px solid var(--border);
  background: rgba(8, 8, 8, 0.64);
  padding: 7px 9px;
}

.intro {
  max-width: 640px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 1.18rem;
}

.scroll-indicator {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  margin-top: 52px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 12px;
  transition: color 180ms ease;
}

.scroll-indicator i {
  display: block;
  width: 44px;
  height: 1px;
  background: currentColor;
  transform-origin: left;
  transition: transform 220ms ease;
}

.scroll-indicator:hover {
  color: var(--accent);
}

.scroll-indicator:hover i {
  transform: scaleX(1.32);
}

.copy {
  margin-top: 34px;
  color: var(--muted);
  font-size: 1.18rem;
}

.copy p {
  margin: 0;
}

.copy p + p {
  margin-top: 26px;
}

.skill-grid,
.principle-grid {
  display: grid;
  margin-top: 42px;
  gap: 10px;
}

.skill-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.principle-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 860px;
}

.skill-grid article,
.principle-grid span {
  position: relative;
  min-height: 88px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  border: 1px solid var(--border);
  background: rgba(10, 10, 10, 0.82);
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.45;
  padding: 18px;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    background-color 140ms ease,
    color 140ms ease;
}

.skill-grid article::before,
.principle-grid span::before {
  position: absolute;
  top: -1px;
  left: -1px;
  width: 28px;
  height: 1px;
  content: "";
  background: var(--accent);
  opacity: 0;
  transition: opacity 140ms ease, width 140ms ease;
}

.skill-grid article span,
.principle-grid span i {
  margin-bottom: 16px;
  color: rgba(94, 234, 212, 0.74);
  font-style: normal;
  font-size: 10px;
}

.skill-grid article:hover,
.principle-grid span:hover {
  border-color: rgba(94, 234, 212, 0.5);
  background: rgba(14, 14, 14, 0.96);
  color: var(--text);
  transform: translateY(-3px);
}

.skill-grid article:hover::before,
.principle-grid span:hover::before {
  width: 64px;
  opacity: 1;
}

.work-section {
  min-height: auto;
  align-items: flex-start;
  padding-top: clamp(104px, 14vh, 156px);
  padding-bottom: clamp(104px, 14vh, 156px);
  scroll-snap-stop: normal;
}

.work-section .section-inner {
  width: min(100%, 1220px);
}

.work-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 44px;
}

.work-lead {
  max-width: 620px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.work-controls {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.work-control {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: rgba(13, 13, 13, 0.86);
  color: rgba(255, 255, 255, 0.78);
  font-family: var(--mono);
  font-size: 16px;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    background-color 160ms ease;
}

.work-control:hover {
  border-color: rgba(94, 234, 212, 0.46);
  background: rgba(16, 16, 16, 0.96);
  color: var(--accent);
  transform: translateY(-2px);
}

.work-counter {
  min-width: 58px;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--mono);
  font-size: 11px;
  text-align: center;
}

.work-slider {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.045);
  background: rgba(8, 8, 8, 0.28);
  touch-action: pan-y;
}

.work-track {
  position: relative;
}

.work-slider.is-dragging {
  cursor: grabbing;
}

.work-card {
  position: absolute;
  inset: 0;
  width: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(clamp(132px, 22vw, 240px), 0.72fr) minmax(0, 1.28fr);
  gap: clamp(30px, 4vw, 72px);
  align-items: start;
  border: 0;
  background: rgba(13, 13, 13, 0.88);
  opacity: 0;
  padding: clamp(34px, 4vw, 58px);
  pointer-events: none;
  transform: translateX(18px);
  transition:
    opacity 220ms ease,
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 220ms ease,
    background-color 160ms ease;
  visibility: hidden;
}

.work-card.is-active {
  position: relative;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
  visibility: visible;
}

.work-card::before {
  position: absolute;
  top: -1px;
  left: -1px;
  width: 72px;
  height: 1px;
  content: "";
  background: rgba(94, 234, 212, 0.62);
}

.work-card:hover {
  background: rgba(13, 13, 13, 0.96);
}

.work-card-meta,
.work-card-body {
  min-width: 0;
}

.work-card-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.work-logo {
  width: min(100%, 280px);
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: clamp(28px, 5vh, 48px);
}

.work-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  opacity: 0.86;
  transition: opacity 160ms ease, transform 160ms ease;
}

.work-card:hover .work-logo img,
.work-card:hover .logo-fallback {
  opacity: 1;
  transform: scale(1.025);
}

.logo-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  height: 82px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 600;
  opacity: 0.78;
  transition: opacity 160ms ease, transform 160ms ease, border-color 160ms ease;
}

.work-card:hover .logo-fallback {
  border-color: rgba(94, 234, 212, 0.36);
}

.work-index {
  color: rgba(94, 234, 212, 0.74);
  font-family: var(--mono);
  font-size: 11px;
}

.work-card h3 {
  margin: 22px 0 0;
  color: var(--text);
  font-family: var(--mono);
  font-size: clamp(1.82rem, 2.7vw, 2.45rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.work-card-meta p {
  max-width: 320px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.58);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
}

.work-card-body {
  align-self: start;
  color: var(--muted);
  font-size: clamp(0.98rem, 1vw, 1.04rem);
}

.work-preview {
  width: 100%;
  aspect-ratio: 16 / 8;
  margin: 0 0 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
}

.work-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: top left;
  filter: saturate(0.62) brightness(0.78) contrast(1.08);
  opacity: 0.88;
  transition: opacity 160ms ease, filter 160ms ease, transform 160ms ease;
}

.work-card:hover .work-preview img {
  opacity: 0.96;
  filter: saturate(0.7) brightness(0.86) contrast(1.08);
  transform: scale(1.012);
}

.work-card-body p {
  margin: 0;
}

.work-card-body ul {
  display: grid;
  gap: 10px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  color: rgba(255, 255, 255, 0.78);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.45;
}

.work-card-body li {
  position: relative;
  padding-left: 22px;
}

.work-card-body li::before {
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 8px;
  height: 1px;
  content: "";
  background: rgba(94, 234, 212, 0.72);
}

.work-link {
  display: inline-flex;
  align-items: center;
  margin-top: 34px;
  color: rgba(255, 255, 255, 0.82);
  font-family: var(--mono);
  font-size: 12px;
  transition: color 160ms ease;
}

.work-link::after {
  width: 34px;
  height: 1px;
  margin-left: 12px;
  content: "";
  background: currentColor;
  transform-origin: left;
  transition: transform 160ms ease;
}

.work-link:hover {
  color: var(--accent);
}

.work-link:hover::after {
  transform: scaleX(1.25);
}

.work-dots {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.work-dot {
  width: 34px;
  height: 18px;
  border: 0;
  background: transparent;
  padding: 0;
}

.work-dot::before {
  display: block;
  width: 100%;
  height: 1px;
  content: "";
  background: rgba(255, 255, 255, 0.2);
  transition:
    background-color 160ms ease,
    transform 160ms ease;
}

.work-dot:hover::before,
.work-dot.is-active::before {
  background: var(--accent);
  transform: scaleY(2);
}

.no-script-work {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 0;
}

.approach-lead,
.contact-copy {
  max-width: 620px;
  margin: 34px 0 0;
  color: var(--muted);
  font-size: 1.18rem;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 40px;
}

.contact-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  min-height: 44px;
  border: 1px solid var(--border);
  background: rgba(10, 10, 10, 0.82);
  color: rgba(255, 255, 255, 0.82);
  font-family: var(--mono);
  font-size: 12px;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    background-color 180ms ease;
}

.contact-actions a:hover {
  border-color: rgba(94, 234, 212, 0.46);
  background: rgba(14, 14, 14, 0.96);
  color: var(--accent);
  transform: translateY(-2px);
}

.terminal-footer {
  min-height: 42vh;
  padding: 68px clamp(24px, 5vw, 72px);
  border-top: 1px solid var(--border);
  background: rgba(8, 8, 8, 0.76);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  scroll-snap-align: end;
  scroll-snap-stop: always;
}

.terminal-footer .section-inner {
  margin-left: clamp(0px, 7vw, 96px);
  margin-right: auto;
}

.terminal-footer ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.copyright {
  margin: 28px 0 0;
  color: rgba(255, 255, 255, 0.48);
}

.reveal {
  opacity: 1;
  transform: translateY(0);
}

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.js .hero .reveal {
  opacity: 1;
  transform: translateY(0);
  transition: none;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  opacity: 0;
  transform: translate3d(-50%, -50%, 0);
  transition: opacity 160ms ease, width 160ms ease, height 160ms ease, background-color 160ms ease;
}

body.is-pointer .cursor-dot {
  opacity: 0.8;
}

body.is-pointer.is-hovering .cursor-dot {
  width: 10px;
  height: 10px;
}

@media (hover: hover) and (pointer: fine) {
  html,
  body,
  a,
  button {
    cursor: none;
  }
}

@media (max-width: 1024px), (max-height: 759px) {
  .work-section {
    min-height: auto;
    padding: 104px 24px;
  }

  .work-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 22px;
    margin-bottom: 34px;
  }

  .work-controls {
    width: 100%;
    justify-content: space-between;
  }

  .work-card {
    gap: clamp(22px, 4vw, 34px);
    padding: 30px;
  }

  .work-logo {
    height: 78px;
    margin-bottom: 34px;
  }

  .work-card h3 {
    font-size: 2rem;
  }

  .work-card-body {
    align-self: start;
    font-size: 1rem;
  }

  .work-preview {
    aspect-ratio: 16 / 8.8;
    margin-bottom: 24px;
  }
}

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

  h2 {
    font-size: 3.75rem;
  }

  .statement {
    font-size: 1.45rem;
  }

  .skill-grid,
  .principle-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero .section-inner,
  .section-inner.narrow,
  .terminal-footer .section-inner {
    margin-left: 0;
  }
}

@media (max-width: 680px) {
  body::after,
  .system-rail {
    display: none;
  }

  .site-header {
    align-items: flex-start;
    padding: 20px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .site-nav {
    max-width: 286px;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px 16px;
    line-height: 1.2;
  }

  .section {
    min-height: 100svh;
    padding: 112px 20px;
  }

  .hero {
    min-height: 100svh;
  }

  h1 {
    font-size: 3.45rem;
    line-height: 1.02;
  }

  h2 {
    font-size: 2.65rem;
  }

  .statement {
    margin-top: 28px;
    font-size: 1.12rem;
  }

  .intro,
  .copy,
  .approach-lead,
  .contact-copy {
    font-size: 1rem;
  }

  .skill-grid,
  .principle-grid {
    grid-template-columns: 1fr;
  }

  .work-section {
    padding: 96px 20px;
  }

  .work-lead {
    font-size: 1rem;
  }

  .work-card {
    padding: 24px;
  }

  .work-slider {
    margin-inline: -1px;
  }

  .work-logo {
    height: 64px;
    margin-bottom: 24px;
  }

  .logo-fallback {
    min-width: 64px;
    height: 64px;
    font-size: 0.96rem;
  }

  .work-card h3 {
    font-size: 1.2rem;
  }

  .work-card-body ul {
    gap: 8px;
    margin-top: 24px;
    font-size: 11px;
  }

  .work-preview {
    aspect-ratio: 16 / 10;
  }

  .work-dots {
    flex-wrap: wrap;
  }

  .skill-grid article,
  .principle-grid span {
    min-height: 64px;
    padding: 18px;
  }

  .contact-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .contact-actions a {
    width: 100%;
  }

  .terminal-footer {
    min-height: 36svh;
    padding: 52px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-snap-type: none;
  }

  body {
    scroll-snap-type: none;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
  }

  .background-video {
    filter: blur(2px) brightness(48%) saturate(42%);
  }

  .work-section {
    min-height: auto !important;
    height: auto !important;
  }

  .work-card:hover {
    transform: none;
  }
}
