@font-face {
  font-display: swap;
  font-family: 'Uncut Sans';
  font-weight: 400;
  src: url(../assets/UncutSans-Regular.woff2) format('woff2');
}
@font-face {
  font-display: swap;
  font-family: 'Uncut Sans';
  font-weight: 500;
  src: url(../assets/UncutSans-Medium.woff2) format('woff2');
}
@font-face {
  font-display: swap;
  font-family: 'Uncut Sans';
  font-weight: 700;
  src: url(../assets/UncutSans-Bold.woff2) format('woff2');
}
@font-face {
  font-display: swap;
  font-family: 'Cascadia Code';
  src: url(../assets/CascadiaCode.woff2) format('woff2');
}

:root {
  --green: #27d898;
  --dark: #141224;
  --light: #e9e7e5;
  --purple: #6767f4;
  --red: #ff4d4d;
  --lime: #a8e001;
  --dim: rgba(233, 231, 229, 0.48);
  --faint: rgba(233, 231, 229, 0.13);
  --mono: 'Cascadia Code', ui-monospace, SFMono-Regular, Menlo, monospace;
  --bar: 46px;
  --col: 760px;
  --hero: min(78vw, 680px);
}
* {
  box-sizing: border-box;
}
html,
body {
  background: var(--dark);
  color: var(--light);
  font-family: 'Uncut Sans', system-ui, sans-serif;
  height: 100%;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
::selection {
  background: var(--green);
  color: var(--dark);
}
a {
  color: inherit;
}
button {
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
  padding: 0;
}
[hidden] {
  display: none !important;
}

/* CRT: faint scanlines + vignette, never blocking input */
body::before {
  background: radial-gradient(ellipse at 50% 45%, transparent 55%, rgba(5, 4, 14, 0.42) 100%);
  content: '';
  inset: 0;
  pointer-events: none;
  position: fixed;
  z-index: 40;
}
body::after {
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.021) 0 1px,
    transparent 1px 3px
  );
  content: '';
  inset: 0;
  pointer-events: none;
  position: fixed;
  z-index: 41;
}

#screen {
  inset: 0 0 var(--bar) 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  position: fixed;
  scrollbar-color: var(--faint) transparent;
  scrollbar-width: thin;
}
.page {
  margin: 0 auto;
  max-width: var(--col);
  padding: clamp(48px, 13vh, 128px) clamp(20px, 5vw, 32px) 112px;
}
.page.home {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: none;
  min-height: 100%;
  padding: 56px clamp(20px, 5vw, 32px);
}

/* Terminal lines */
.line {
  font: 15px/1.75 var(--mono);
  white-space: pre-wrap;
  word-break: break-word;
}
.prompt .u {
  color: var(--dim);
}
.prompt .p {
  color: var(--purple);
}
.prompt .s {
  color: var(--dim);
}
.prompt .c,
.prompt .typed {
  color: var(--green);
}
.cursor {
  animation: blink 1.06s steps(1) infinite;
  background: var(--green);
  display: inline-block;
  height: 1.15em;
  margin-left: 1px;
  vertical-align: -0.22em;
  width: 0.6em;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
.out {
  margin: 18px 0 52px;
}
.res {
  color: rgba(233, 231, 229, 0.78);
}
.res .g {
  color: var(--green);
}
.res .d {
  color: var(--dim);
}
.res .r {
  color: var(--red);
}
.res a {
  color: var(--green);
  text-decoration: none;
}
.res a:hover {
  text-decoration: underline;
}
.help {
  display: grid;
  gap: 0 3ch;
  grid-template-columns: max-content 1fr;
}

/* Live prompt: a real input laid over a mirrored line, so the caret can be a block */
.live {
  cursor: text;
  margin-top: 6px;
  position: relative;
}
.live input {
  border: 0;
  cursor: text;
  font-size: 16px;
  height: 100%;
  inset: 0;
  opacity: 0;
  padding: 0;
  position: absolute;
  width: 100%;
}
.live .hint {
  color: var(--dim);
  margin-left: 1.5ch;
  opacity: 0.7;
}
.live:not(.focus) .cursor {
  animation: none;
  background: none;
  box-shadow: inset 0 0 0 1px var(--green);
}

/* Type */
.label {
  color: var(--dim);
  font: 12px/1.6 var(--mono);
  letter-spacing: 0.16em;
  margin: 0 0 16px;
  text-transform: uppercase;
}
.label::before {
  color: var(--green);
  content: '# ';
}
.title {
  font-size: clamp(46px, 8.4vw, 92px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 0.95;
  margin: 0 0 20px;
}
.title span {
  display: inline-block;
}
.prose p {
  color: rgba(233, 231, 229, 0.84);
  font-size: clamp(17px, 1.9vw, 20px);
  line-height: 1.6;
  margin: 0 0 1em;
  max-width: 34em;
}
.prose p.lede {
  color: var(--light);
  font-size: clamp(22px, 2.7vw, 29px);
  letter-spacing: -0.01em;
  line-height: 1.32;
  max-width: 24em;
}
.meta {
  color: var(--dim);
  font: 13px/1.7 var(--mono);
  letter-spacing: 0.04em;
  margin: 0 0 8px;
}
.meta .live-dot {
  color: var(--green);
}

/* Home */
.hero {
  position: relative;
  width: var(--hero);
}
.hero .logo {
  display: block;
  height: auto;
  overflow: visible;
  width: 100%;
}
.hero .logo path {
  fill: var(--green);
  transform-box: fill-box;
  transform-origin: center;
}
.boot {
  font-size: clamp(18px, 3.2vw, 30px);
  left: 0;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
}
.col {
  width: var(--hero);
}
.tagline {
  color: rgba(233, 231, 229, 0.75);
  font: clamp(11px, 1.3vw, 13px) / 1.6 var(--mono);
  letter-spacing: 0.2em;
  margin-top: clamp(24px, 4vw, 42px);
  min-height: 1.6em;
  text-align: center;
  text-transform: uppercase;
}
.tagline .cursor {
  height: 1em;
  vertical-align: -0.15em;
  width: 0.55em;
}
.menu {
  margin: clamp(44px, 8vh, 80px) 0 22px;
}
.menu a {
  align-items: baseline;
  border-top: 1px solid var(--faint);
  display: grid;
  font: 15px/1.4 var(--mono);
  gap: 1ch;
  grid-template-columns: 3ch 11ch 1fr auto;
  padding: 12px 2px;
  text-decoration: none;
  transition: background 0.15s;
}
.menu a:last-child {
  border-bottom: 1px solid var(--faint);
}
.menu .k,
.menu .d {
  color: var(--dim);
}
.menu .ar {
  color: var(--green);
  opacity: 0;
  transform: translateX(-6px);
  transition: all 0.18s;
}
.menu a:hover {
  background: rgba(233, 231, 229, 0.03);
}
.menu a:hover .n {
  color: var(--green);
}
.menu a:hover .ar {
  opacity: 1;
  transform: none;
}

/* Projects */
.ls {
  color: var(--dim);
  display: grid;
  font: 14px/1.9 var(--mono);
  gap: 0 3ch;
  grid-template-columns: repeat(4, max-content);
}
.ls a {
  color: var(--green);
  text-decoration: none;
}
.shot {
  margin: 34px 0 38px;
  overflow: hidden;
  position: relative;
}
.shot img {
  display: block;
  height: auto;
  width: 100%;
}
.shot .scan {
  background: var(--green);
  box-shadow: 0 0 18px 3px rgba(39, 216, 152, 0.55);
  height: 2px;
  left: -2%;
  opacity: 0;
  position: absolute;
  right: -2%;
  top: 0;
}
.feat {
  column-gap: 32px;
  columns: 2;
  font: 15px/1.95 var(--mono);
  list-style: none;
  margin: 0 0 36px;
  padding: 0;
}
.feat li {
  break-inside: avoid;
  color: rgba(233, 231, 229, 0.82);
}
.feat li::before {
  color: var(--green);
  content: '+ ';
}
.go {
  border-bottom: 1px solid transparent;
  color: var(--green);
  display: inline-block;
  font: 15px/1.6 var(--mono);
  text-decoration: none;
}
.go:hover {
  border-bottom-color: var(--green);
}

/* Contact */
.form {
  border: 1px solid var(--faint);
  border-radius: 6px;
  font: 15px/1.7 var(--mono);
  margin: 30px 0 44px;
  padding: 6px clamp(14px, 3vw, 22px) 18px;
}
.field {
  align-items: baseline;
  border-bottom: 1px dashed var(--faint);
  display: grid;
  grid-template-columns: 9ch 1fr;
  padding: 11px 0;
}
.field label {
  color: var(--dim);
  transition: color 0.15s;
}
.field:focus-within label {
  color: var(--green);
}
.field input,
.field textarea {
  background: none;
  border: 0;
  caret-color: var(--green);
  color: var(--light);
  font: inherit;
  font-size: max(16px, 1em);
  outline: 0;
  padding: 0;
  resize: none;
  width: 100%;
}
.field textarea {
  line-height: 1.7;
  min-height: 7.5em;
}
.field .to {
  color: var(--light);
}
.field input::placeholder,
.field textarea::placeholder {
  color: rgba(233, 231, 229, 0.25);
}
.actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 18px;
}
.send {
  border: 1px solid var(--green);
  border-radius: 4px;
  color: var(--green);
  font: 15px var(--mono);
  padding: 9px 16px;
  transition: all 0.15s;
}
.send:hover,
.send:focus-visible {
  background: var(--green);
  color: var(--dark);
  outline: 0;
}
.actions .d {
  color: var(--dim);
  font-size: 13px;
}

/* Status bar (tmux-style) */
.bar {
  align-items: center;
  backdrop-filter: blur(6px);
  background: rgba(20, 18, 36, 0.94);
  border-top: 1px solid var(--faint);
  bottom: 0;
  display: flex;
  font: 13px var(--mono);
  gap: clamp(10px, 2vw, 20px);
  height: var(--bar);
  left: 0;
  padding: 0 clamp(12px, 3vw, 24px);
  position: fixed;
  right: 0;
  z-index: 30;
}
.bar .home {
  align-items: center;
  display: flex;
}
.bar .sym {
  display: block;
  width: 30px;
}
.bar .sym path {
  fill: var(--light);
  transition: fill 0.15s;
}
.bar .home:hover .sym path {
  fill: var(--green);
}
.bar nav {
  color: var(--dim);
  white-space: nowrap;
}
.bar .sep {
  background: currentColor;
  display: inline-block;
  height: 0.75em;
  margin: 0 0.8ch;
  opacity: 0.5;
  vertical-align: -0.12em;
  width: 1px;
}
.bar nav a {
  color: var(--dim);
  padding: 4px 2px;
  text-decoration: none;
  transition: color 0.15s;
}
.bar nav a[data-route='projects']:hover {
  color: var(--purple);
}
.bar nav a[data-route='contact']:hover {
  color: var(--red);
}
.bar nav a[aria-current='page'] {
  color: var(--green);
}
.bar .right {
  align-items: center;
  color: var(--dim);
  display: flex;
  gap: clamp(12px, 2vw, 20px);
  margin-left: auto;
}
.bar .lang {
  white-space: nowrap;
}
.bar .lang button {
  color: var(--dim);
  padding: 4px 2px;
  transition: color 0.15s;
}
.bar .lang button:hover {
  color: var(--light);
}
.bar .lang button.on {
  color: var(--green);
}
.bar #snd:hover {
  color: var(--light);
}
.bar #snd.on {
  color: var(--green);
}
@media (max-width: 720px) {
  .bar #snd .t {
    display: none;
  }
  .feat {
    columns: 1;
  }
  .ls {
    grid-template-columns: repeat(2, max-content);
  }
  .ls .perm,
  .ls .desc {
    display: none;
  }
  .menu a {
    grid-template-columns: 3ch 9ch 1fr auto;
  }
  .menu .d {
    font-size: 13px;
  }
  .prompt .u {
    display: none;
  }
}
@media (max-width: 420px) {
  .menu .d {
    display: none;
  }
  .menu a {
    grid-template-columns: 3ch 1fr auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cursor {
    animation: none;
  }
}
