@font-face {
  font-family: "Modern DOS";
  src: url("assets/ModernDOS8x16.ttf") format("truetype");
  font-display: swap;
}

:root {
  --black: #000;
  --terminal: #b8ffbe;
  --bright: #effff0;
  --dim: #6ca770;
  --faint: #2a522d;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--black); }
body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--terminal);
  background: var(--black);
  font-family: "Modern DOS", "Courier New", monospace;
  font-size: 16px;
  line-height: 1.34;
}
body.is-booting { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; }

.scanlines { position: fixed; z-index: 10; inset: 0; pointer-events: none; opacity: .12; background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(184, 255, 190, .18) 3px 4px); mix-blend-mode: screen; }

.bios { position: fixed; z-index: 20; inset: 0; display: flex; flex-direction: column; padding: clamp(20px, 4vw, 54px); color: var(--terminal); background: #000; font-size: clamp(14px, 1.6vw, 18px); }
.bios__header { padding-bottom: 9px; color: var(--bright); border-bottom: 1px solid var(--terminal); }
.bios__log { flex: 1; padding-top: 25px; }
.bios__log p { margin: 0 0 4px; }
.bios__log .ok { color: var(--bright); }
.bios__log .pending { color: var(--dim); }
.bios__footer { display: flex; justify-content: space-between; gap: 22px; color: var(--bright); }
.bios__footer button { padding: 0; cursor: pointer; border: 0; background: none; }
.bios__footer button:hover { text-decoration: underline; }
.bios.is-done { pointer-events: none; animation: screen-off .45s ease forwards; }
@keyframes screen-off { to { opacity: 0; visibility: hidden; } }

.site { position: relative; opacity: 0; transition: opacity .5s ease .12s; }
.site.is-ready { opacity: 1; }
.status-bar { position: sticky; z-index: 5; top: 0; display: flex; align-items: center; min-height: 49px; padding: 11px clamp(18px, 4vw, 58px); color: var(--bright); border-bottom: 1px solid var(--faint); background: rgba(0, 0, 0, .94); }
.brand { white-space: nowrap; }
.status-bar nav { display: flex; gap: clamp(14px, 3vw, 34px); margin-left: auto; margin-right: clamp(14px, 4vw, 52px); font-size: 13px; }
.status-bar a:hover, footer a:hover { color: var(--bright); text-decoration: underline; text-underline-offset: 4px; }
.clock { min-width: 70px; color: var(--dim); font-size: 13px; text-align: right; }

.terminal-block { width: min(1100px, 100%); margin: 0 auto; padding: clamp(65px, 10vw, 140px) clamp(18px, 6vw, 72px); border-bottom: 1px dashed var(--faint); }
.prompt { color: var(--bright); }
.typed { color: var(--terminal); }
.muted, .dim { color: var(--dim); }
.hero { min-height: calc(100vh - 49px); display: flex; flex-direction: column; justify-content: space-between; }
.hero > p, .command-heading > p, .about > p, .contact > p { margin: 0; }
.hero__response { padding: 30px 0; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-weight: normal; }
h1 { margin-bottom: clamp(22px, 3vw, 37px); color: var(--bright); font-size: clamp(64px, 14vw, 180px); letter-spacing: -.06em; line-height: .8; }
h2 { margin-bottom: 35px; color: var(--bright); font-size: clamp(36px, 6vw, 84px); letter-spacing: -.05em; line-height: .88; }
.hero__line { max-width: 630px; margin-bottom: 14px; font-size: clamp(18px, 2.25vw, 29px); line-height: 1.25; }
.hero__response .muted { margin: 0; font-size: 13px; }
.status-dot { color: var(--bright); animation: pulse 1.6s step-end infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.next-command { display: inline-block; width: max-content; font-size: 14px; }
.next-command b { display: inline-block; margin-left: 7px; color: var(--bright); transition: transform .2s ease; }
.next-command:hover b { transform: translate(5px, 5px); }

.command-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: clamp(36px, 6vw, 75px); }
.command-heading .muted { margin: 0; font-size: 12px; }
.projects h2 { margin-bottom: clamp(28px, 5vw, 56px); }
.project-list { border-top: 1px solid var(--faint); }
.project { display: grid; grid-template-columns: 62px 1fr; gap: clamp(12px, 3vw, 32px); padding: clamp(24px, 4vw, 46px) 0; border-bottom: 1px solid var(--faint); }
.project--media { grid-template-columns: 62px minmax(0, 1fr) minmax(190px, .56fr); }
.project__number { color: var(--dim); }
.project__title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.project h3 { margin: 0 0 13px; color: var(--bright); font-size: clamp(25px, 4.2vw, 48px); letter-spacing: -.04em; line-height: .9; }
.project__link { flex: none; padding: 3px 0; color: var(--terminal); border-bottom: 1px solid; font-size: 13px; }
.project__link:hover { color: var(--bright); }
.project__body > p:not(.tag) { max-width: 640px; margin-bottom: 14px; font-size: clamp(16px, 1.8vw, 21px); line-height: 1.4; }
.tag { margin: 0; color: var(--dim); font-size: 12px; }
.project__media { position: relative; align-self: center; aspect-ratio: 1.1; width: 100%; margin: 0; padding: 0; overflow: hidden; cursor: pointer; border: 1px solid var(--faint); background: #050505; box-shadow: 5px 5px 0 #071308; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.project__media-stack { align-self: center; }
.project__media img { display: block; width: 100%; height: 100%; object-fit: contain; filter: saturate(.82) contrast(1.04); }
.project__media::before, .project__media::after { position: absolute; z-index: 1; inset: 0; content: ""; pointer-events: none; }
.project__media::before { opacity: .32; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .8) 0 1px, transparent 1px 4px); mix-blend-mode: multiply; }
.project__media::after { opacity: 0; background: linear-gradient(112deg, transparent 31%, rgba(239, 255, 240, .4) 49%, transparent 66%); transform: translateX(-120%); transition: opacity .15s ease; }
.project__media-label { position: absolute; z-index: 2; right: 0; bottom: 0; left: 0; display: block; padding: 7px 9px; color: var(--bright); background: rgba(0, 0, 0, .78); font-size: 10px; text-align: left; }
.audio-project:hover .project__media, .audio-project:focus-within .project__media, .audio-project.is-playing .project__media { border-color: var(--terminal); box-shadow: 7px 7px 0 #173419; transform: translate(-2px, -2px); }
.audio-project.is-playing .project__media::after { opacity: .44; animation: tape-sweep 2.8s steps(2, end) infinite; }
.audio-project.is-playing .project__media::before { animation: scan-jitter .2s steps(2, end) infinite; }
@keyframes tape-sweep { 0%, 100% { transform: translateX(-120%); } 55% { transform: translateX(120%); } }
@keyframes scan-jitter { 50% { transform: translateY(2px); opacity: .5; } }
.media-controls { display: flex; align-items: center; gap: 8px; min-height: 27px; padding-top: 9px; color: var(--dim); font-size: 10px; }
.track-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-controls button { padding: 3px 5px; cursor: pointer; color: var(--terminal); border: 1px solid var(--faint); background: #000; font-size: 10px; }
.media-controls button:hover, .media-controls button[aria-pressed="true"] { color: var(--bright); border-color: var(--terminal); }
.track-switch { min-width: 25px; color: var(--bright) !important; font-size: 15px !important; line-height: 1; }

.about__response { max-width: 720px; }
.about__response p { margin: 0; color: var(--terminal); font-size: clamp(18px, 2.2vw, 27px); line-height: 1.37; }
.contact { min-height: 58vh; display: flex; flex-direction: column; justify-content: space-between; }
.contact__response { padding-top: clamp(50px, 8vw, 120px); }
.contact__links { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }
.github-link { display: inline-block; color: var(--bright); border-bottom: 2px solid var(--terminal); font-size: clamp(18px, 3.2vw, 42px); line-height: 1.25; }
.github-link span { color: var(--terminal); }
.github-link:hover { color: var(--terminal); }

.console { width: min(1100px, calc(100% - clamp(36px, 12vw, 144px))); margin: clamp(72px, 11vw, 140px) auto; color: var(--terminal); border: 1px solid var(--terminal); box-shadow: 8px 8px 0 var(--faint); }
.console__bar { display: flex; justify-content: space-between; padding: 8px 11px; color: #000; background: var(--terminal); font-size: 13px; }
.console__output { min-height: 130px; max-height: 260px; overflow-y: auto; padding: 18px 18px 2px; font-size: 14px; }
.console__output p { margin-bottom: 5px; }
.inline-command { padding: 0; cursor: pointer; color: var(--bright); border: 0; border-bottom: 1px solid; background: none; }
.console__input { display: flex; gap: 8px; align-items: center; padding: 2px 18px 18px; font-size: 14px; }
.console__input input { flex: 1; min-width: 20px; padding: 0; outline: 0; color: var(--terminal); border: 0; background: transparent; text-transform: uppercase; }
.cursor { width: 9px; height: 16px; margin-left: -9px; background: var(--terminal); animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

footer { display: flex; justify-content: space-between; padding: 19px clamp(18px, 4vw, 58px); color: var(--dim); border-top: 1px solid var(--faint); font-size: 12px; }
footer button { padding: 0; cursor: pointer; color: var(--dim); border: 0; background: none; }
footer button:hover { color: var(--bright); }

.reveal { opacity: 0; transform: translateY(13px); transition: opacity .4s ease, transform .4s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 620px) {
  .status-bar { padding-top: 13px; padding-bottom: 13px; }
  .brand { font-size: 13px; }
  .status-bar nav { gap: 11px; margin-right: 0; font-size: 11px; }
  .clock { display: none; }
  .project { grid-template-columns: 1fr; gap: 8px; }
  .project--media { grid-template-columns: 1fr; }
  .project__title-row { align-items: flex-start; flex-direction: column; gap: 2px; }
  .project__media-stack { width: min(100%, 320px); margin-top: 15px; }
  .project__media { margin-top: 0; }
  .console { width: calc(100% - 36px); box-shadow: 5px 5px 0 var(--faint); }
  .console__input, .console__output { font-size: 12px; }
  .console__input { gap: 5px; padding-right: 12px; padding-left: 12px; }
  .console__output { padding-right: 12px; padding-left: 12px; }
}

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