/* ==========================================================================
   ram0verflow — shell-first portfolio
   The terminal IS the site. The document view is the alternate reading mode.
   ========================================================================== */

:root {
  --bg:         #05060a;
  --bg-raised:  #0b0d13;
  --bg-sunken:  #08090e;
  --fg:         #d8dce3;
  --fg-dim:     #8a919c;
  --fg-faint:   #5a616b;
  --border:     #1e222c;
  --border-lit: #2c3340;
  --red:        #ff5555;

  /* Overridden per theme */
  --p:      #f2a900;   /* primary phosphor */
  --p-soft: #ffc849;
  --s:      #00ff41;   /* secondary phosphor */
  --s-soft: #7dffab;

  --glow-p: 0 0 4px rgba(242,169,0,.5), 0 0 14px rgba(242,169,0,.2);
  --glow-s: 0 0 4px rgba(0,255,65,.45), 0 0 14px rgba(0,255,65,.16);

  --maxw: 1080px;
  --ease: cubic-bezier(.2,.7,.3,1);
}

body[data-theme="green"] {
  --p: #00ff41; --p-soft: #7dffab; --s: #00cc99; --s-soft: #66ffd9;
  --glow-p: 0 0 4px rgba(0,255,65,.5), 0 0 14px rgba(0,255,65,.2);
  --glow-s: 0 0 4px rgba(0,204,153,.45), 0 0 14px rgba(0,204,153,.16);
}
body[data-theme="ice"] {
  --p: #5ec8ff; --p-soft: #a5e2ff; --s: #7f8cff; --s-soft: #b3bbff;
  --glow-p: 0 0 4px rgba(94,200,255,.5), 0 0 14px rgba(94,200,255,.2);
  --glow-s: 0 0 4px rgba(127,140,255,.45), 0 0 14px rgba(127,140,255,.16);
}
body[data-theme="mono"] {
  --p: #e8e8e8; --p-soft: #ffffff; --s: #a8a8a8; --s-soft: #d0d0d0;
  --glow-p: 0 0 4px rgba(255,255,255,.35), 0 0 14px rgba(255,255,255,.12);
  --glow-s: 0 0 3px rgba(255,255,255,.2);
}

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Fira Code', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(900px 520px at 50% -10%, rgba(242,169,0,.09), transparent 70%),
    radial-gradient(700px 420px at 85% 10%, rgba(0,255,65,.04), transparent 70%);
}

a { color: var(--s); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

code {
  font-family: inherit;
  background: rgba(242,169,0,.1);
  border: 1px solid rgba(242,169,0,.2);
  color: var(--p-soft);
  padding: .05em .4em; border-radius: 3px; font-size: .9em;
}

.hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--p); outline-offset: 2px; }

.noscript { max-width: 60ch; margin: 4rem auto; padding: 0 1.5rem; }

/* ============================ CRT ATMOSPHERE =========================== */

#matrixCanvas {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: -1; opacity: .07; pointer-events: none;
  transition: opacity .4s var(--ease);
}
body[data-matrix="off"] #matrixCanvas { opacity: 0; }
body[data-matrix="high"] #matrixCanvas { opacity: .2; }

.crt-scanlines {
  position: fixed; inset: 0; z-index: 900; pointer-events: none;
  background: repeating-linear-gradient(
    to bottom, rgba(0,0,0,0) 0px, rgba(0,0,0,0) 2px,
    rgba(0,0,0,.26) 3px, rgba(0,0,0,.26) 4px);
  mix-blend-mode: multiply; opacity: .5;
}

.crt-vignette {
  position: fixed; inset: 0; z-index: 901; pointer-events: none;
  background: radial-gradient(130% 100% at 50% 50%,
    transparent 55%, rgba(0,0,0,.32) 82%, rgba(0,0,0,.7) 100%);
}

body.ready { animation: crtOn .5s var(--ease) both; }
@keyframes crtOn {
  0%   { opacity: 0; filter: brightness(3) contrast(.4); transform: scaleY(.004); }
  22%  { opacity: 1; filter: brightness(1.6); transform: scaleY(.02); }
  45%  { transform: scaleY(1); filter: brightness(1.2); }
  65%  { filter: brightness(.88); }
  100% { filter: brightness(1); }
}

/* ============================== VIEW BAR =============================== */

.viewbar {
  position: fixed; top: .8rem; right: .9rem; z-index: 800;
  display: flex; gap: .5rem;
}
.vb-btn {
  display: flex; align-items: center; gap: .45rem;
  background: rgba(11,13,19,.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-lit);
  color: var(--s);
  font-family: inherit; font-size: .74rem;
  padding: .4rem .7rem; border-radius: 5px; cursor: pointer;
  transition: all .2s var(--ease);
}
.vb-btn:hover { border-color: var(--s); box-shadow: var(--glow-s); }
.vb-icon-only { padding: .4rem .55rem; }

/* One-off pulse for first-time visitors, so the other view is discoverable
   without a permanent banner nagging everyone who already knows. */
.vb-attract {
  border-color: var(--p);
  color: var(--p);
  animation: attract 1.6s var(--ease) 3;
}
@keyframes attract {
  0%, 100% { box-shadow: 0 0 0 0 rgba(242,169,0,.5); }
  50%      { box-shadow: 0 0 0 7px rgba(242,169,0,0); }
}
@media (prefers-reduced-motion: reduce) { .vb-attract { animation: none; } }
.vb-btn[aria-pressed="true"] { color: var(--fg-faint); }
.vb-btn[aria-pressed="true"] .mute-icon { position: relative; }
.vb-btn[aria-pressed="true"] .mute-icon::after {
  content: ''; position: absolute; left: -3px; top: 50%;
  width: 15px; height: 1px; background: var(--fg-faint); transform: rotate(-45deg);
}

/* ============================== SKELETON =============================== */

.skeleton, .content-error {
  max-width: var(--maxw); margin: 0 auto;
  padding: 5rem clamp(1rem, 4vw, 2.5rem); color: var(--s);
}
.skeleton-line { margin: 0 0 .6rem; opacity: 0; animation: skelIn .4s var(--ease) forwards; }
.skeleton-line:nth-child(2) { animation-delay: .3s; }
.skeleton-line:nth-child(3) { animation-delay: .6s; }
@keyframes skelIn { to { opacity: 1; } }
.dots::after { content: ''; animation: dots 1.4s steps(4,end) infinite; }
@keyframes dots { 0%{content:''} 25%{content:'.'} 50%{content:'..'} 75%{content:'...'} }
.skeleton-cursor {
  display: inline-block; border-left: .6em solid var(--s);
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%,50%{opacity:1} 51%,100%{opacity:0} }

.content-error { color: var(--fg); }
.error-title { color: var(--red); font-size: 1.4rem; margin: 0 0 1rem; }
.error-body { color: var(--fg-dim); max-width: 60ch; }
.error-detail { color: var(--fg-faint); font-size: .8rem; word-break: break-all; }

/* ================================= TTY ================================= */

body[data-view="tty"] { overflow: hidden; }
body[data-view="doc"] .tty { display: none; }
body[data-view="tty"] .doc { display: none; }

.tty {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  padding: clamp(0px, 2vw, 26px);
  z-index: 10;
}

.tty-chrome {
  display: flex; align-items: center; gap: .45rem;
  padding: .55rem .9rem;
  background: #10131a;
  border: 1px solid var(--border-lit);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  flex-shrink: 0;
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot-r{background:#ff5f57} .dot-y{background:#febc2e} .dot-g{background:#28c840}
.tty-title {
  margin: 0 auto; color: var(--fg-faint); font-size: .72rem;
  transform: translateX(-18px);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.tty-scroll {
  flex: 1; min-height: 0;
  overflow-y: auto;
  padding: 1rem clamp(.7rem, 2vw, 1.4rem);
  background: rgba(6,7,11,.72);
  backdrop-filter: blur(2px);
  border: 1px solid var(--border-lit);
  border-radius: 0 0 8px 8px;
  cursor: text;
  box-shadow: inset 0 0 90px rgba(242,169,0,.03), 0 20px 70px rgba(0,0,0,.6);
  font-size: clamp(12px, 1.55vw, 14px);
  line-height: 1.55;
}

.screen { white-space: pre-wrap; word-break: break-word; }

.row { white-space: pre-wrap; min-height: 1.1em; }
.out-amber { color: var(--p); text-shadow: var(--glow-p); }
.out-green { color: var(--s); text-shadow: var(--glow-s); }
.out-dim   { color: var(--fg-dim); }
.out-error { color: var(--red); }

.sl { margin: 0; font-family: inherit; line-height: 1.15; }

.cmdline { display: flex; align-items: baseline; gap: .5ch; margin-top: .15rem; }
.prompt { color: var(--p); text-shadow: var(--glow-p); flex-shrink: 0; white-space: nowrap; }

#cmdInput {
  flex: 1; min-width: 0;
  background: transparent; border: none; outline: none;
  color: var(--fg); font-family: inherit; font-size: 1em;
  caret-color: var(--p); padding: 0;
}
#cmdInput:disabled { opacity: .7; }

.ac {
  position: absolute; z-index: 700;
  background: #12151d; border: 1px solid var(--border-lit); border-radius: 5px;
  max-height: 190px; overflow-y: auto; min-width: 150px;
  box-shadow: 0 12px 34px rgba(0,0,0,.65);
  margin-top: .3rem;
}
.ac-item { padding: .22rem .7rem; cursor: pointer; font-size: .84rem; color: var(--fg-dim); }
.ac-item.selected, .ac-item:hover { background: var(--p); color: #000; }

.tty-keys {
  display: flex; gap: .4rem; flex-wrap: nowrap;
  overflow-x: auto; scrollbar-width: none;
  padding: .55rem .1rem 0;
  flex-shrink: 0;
}
.tty-keys::-webkit-scrollbar { display: none; }
.tty-keys button {
  flex-shrink: 0;
  background: rgba(11,13,19,.8);
  border: 1px solid var(--border-lit);
  color: var(--fg-dim);
  font-family: inherit; font-size: .72rem;
  padding: .3rem .65rem; border-radius: 4px; cursor: pointer;
  transition: all .18s var(--ease);
}
.tty-keys button:hover { color: var(--p); border-color: var(--p); }

/* ================================= DOC ================================= */

.doc { position: relative; z-index: 10; }

.topbar {
  position: sticky; top: 0; z-index: 500;
  display: flex; align-items: center; gap: 1.5rem;
  padding: .7rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(5,6,10,.8); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-brand { color: var(--p); text-shadow: var(--glow-p); font-weight: 600; }
.brand-prompt { color: var(--s); }
.topbar-nav { display: flex; gap: 1.2rem; margin-left: auto; margin-right: 8rem; font-size: .82rem; }
.topbar-nav a { color: var(--fg-dim); }
.topbar-nav a:hover { color: var(--s); text-shadow: var(--glow-s); text-decoration: none; }

.hero-doc {
  max-width: var(--maxw); margin: 0 auto;
  padding: 4rem clamp(1rem, 4vw, 2.5rem) 2rem;
}
.hero-name {
  font-size: clamp(2rem, 6.5vw, 3.8rem); line-height: 1.05;
  margin: 0 0 .5rem; letter-spacing: -.02em; color: #fff;
  text-shadow: 0 0 18px rgba(255,255,255,.16);
}
.hero-tagline {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--p); text-shadow: var(--glow-p); margin: 0 0 .9rem;
}
.caret { color: var(--s); }
.hero-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
  color: var(--fg-dim); font-size: .84rem; margin: 0 0 1.3rem;
}
.sep { color: var(--fg-faint); }
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--s); box-shadow: var(--glow-s);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.35} }
.hero-bio { max-width: 68ch; color: var(--fg-dim); margin: 0 0 1.8rem; font-size: .93rem; }

.actions { display: flex; flex-wrap: wrap; gap: .7rem; }

.btn {
  display: inline-block; font-family: inherit; font-size: .84rem;
  padding: .58rem 1.15rem; border-radius: 4px; cursor: pointer;
  border: 1px solid var(--border-lit); background: transparent; color: var(--fg);
  transition: all .2s var(--ease);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: var(--p); color: #000; border-color: var(--p);
  font-weight: 600; box-shadow: 0 0 16px rgba(242,169,0,.26);
}
.btn-primary:hover { background: var(--p-soft); }
.btn-ghost { color: var(--s); }
.btn-ghost:hover { border-color: var(--s); box-shadow: var(--glow-s); }

.section {
  max-width: var(--maxw); margin: 0 auto;
  padding: 3.5rem clamp(1rem, 4vw, 2.5rem);
  scroll-margin-top: 4rem;
}
.section-head { margin-bottom: 2rem; }
.section-title {
  display: flex; align-items: baseline; gap: .8rem;
  font-size: clamp(1.25rem, 3.2vw, 1.8rem); margin: 0 0 .5rem; color: #fff;
}
.section-title::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(to right, var(--border-lit), transparent);
}
.section-idx { color: var(--p); text-shadow: var(--glow-p); font-size: .72em; font-weight: 400; }
.section-sub { color: var(--fg-dim); font-size: .87rem; margin: 0; max-width: 65ch; }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }

.timeline { position: relative; padding-left: 1.6rem; }
.timeline::before {
  content: ''; position: absolute; left: 4px; top: .6rem; bottom: .6rem; width: 1px;
  background: linear-gradient(to bottom, var(--p), var(--border-lit) 70%, transparent); opacity: .5;
}
.tl-item { position: relative; margin-bottom: 2.4rem; }
.tl-item::before {
  content: ''; position: absolute; left: -1.6rem; top: .5rem;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--p); box-shadow: var(--glow-p);
}
.tl-period { color: var(--s); font-size: .77rem; text-shadow: var(--glow-s); }
.tl-title { font-size: 1.02rem; margin: .15rem 0 .1rem; color: #fff; font-weight: 600; }
.tl-org { color: var(--p); font-size: .92rem; }
.tl-note { color: var(--fg-faint); font-size: .77rem; margin-bottom: .7rem; }
.tl-story { color: var(--fg-dim); margin: 0 0 .8rem; max-width: 72ch; font-size: .89rem; }
.tl-highlights { margin: 0 0 1rem; padding-left: 1.1rem; color: var(--fg-dim); font-size: .85rem; }
.tl-highlights li { margin-bottom: .45rem; max-width: 72ch; }
.tl-highlights li::marker { color: var(--p); }

.tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag {
  font-size: .71rem; padding: .18rem .55rem;
  border: 1px solid var(--border-lit); border-radius: 3px;
  color: var(--fg-dim); background: rgba(255,255,255,.02);
  transition: all .2s var(--ease);
}
.tag:hover { color: var(--s); border-color: var(--s); }

.education {
  margin-top: 1rem; padding: 1rem 1.2rem;
  border: 1px solid var(--border); border-radius: 6px; background: var(--bg-raised);
}
.edu-degree { color: #fff; font-weight: 600; font-size: .94rem; }
.edu-meta { color: var(--fg-dim); font-size: .82rem; }

.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 1.1rem; }
.project-card {
  position: relative; display: flex; flex-direction: column;
  padding: 1.25rem; border: 1px solid var(--border); border-radius: 8px;
  background: linear-gradient(160deg, var(--bg-raised), var(--bg-sunken));
  transition: all .28s var(--ease); overflow: hidden;
}
.project-card::after {
  content: ''; position: absolute; inset: 0; opacity: 0; pointer-events: none;
  background: radial-gradient(400px 200px at 50% 0%, rgba(242,169,0,.08), transparent 70%);
  transition: opacity .3s var(--ease);
}
.project-card:hover { transform: translateY(-3px); border-color: var(--border-lit); box-shadow: 0 14px 40px rgba(0,0,0,.5); }
.project-card:hover::after { opacity: 1; }
.project-card.featured { border-color: rgba(242,169,0,.28); }
.pc-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.pc-name { font-size: .98rem; font-weight: 600; color: var(--p); text-shadow: var(--glow-p); margin: 0; }
.pc-name a { color: inherit; }
.pc-badge {
  margin-left: auto; font-size: .63rem; padding: .1rem .45rem;
  border-radius: 3px; border: 1px solid var(--border-lit); color: var(--fg-faint);
}
.pc-badge.live { color: var(--s); border-color: rgba(0,255,65,.3); }
.pc-desc { color: var(--fg-dim); font-size: .84rem; margin: 0 0 1rem; flex: 1; }

.skill-clusters { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: 1.1rem; }
.skill-group { padding: 1.05rem; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-raised); }
.skill-label {
  color: var(--s); text-shadow: var(--glow-s); font-size: .73rem;
  text-transform: uppercase; letter-spacing: .1em; margin: 0 0 .7rem;
}

.achievement-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.ach-item {
  display: flex; align-items: baseline; gap: .8rem;
  padding: .78rem 1rem; border: 1px solid var(--border);
  border-left: 2px solid var(--p); border-radius: 0 6px 6px 0;
  background: var(--bg-raised); transition: all .22s var(--ease);
}
.ach-item:hover { border-left-color: var(--s); transform: translateX(3px); }
.ach-title { color: #fff; font-size: .89rem; font-weight: 600; }
.ach-detail { color: var(--fg-dim); font-size: .79rem; }
.ach-date { margin-left: auto; color: var(--fg-faint); font-size: .73rem; white-space: nowrap; }

.contact-card {
  text-align: center; padding: 3rem 1.5rem;
  border: 1px solid var(--border-lit); border-radius: 10px;
  background: radial-gradient(600px 300px at 50% 0%, rgba(242,169,0,.08), transparent 70%), var(--bg-raised);
}
.contact-title { font-size: clamp(1.35rem, 4vw, 2rem); margin: 0 0 .6rem; color: #fff; }
.contact-body { color: var(--fg-dim); margin: 0 auto 1.7rem; max-width: 48ch; font-size: .89rem; }

.footer {
  max-width: var(--maxw); margin: 0 auto;
  padding: 2.5rem clamp(1rem,4vw,2.5rem) 3.5rem;
  border-top: 1px solid var(--border);
  color: var(--fg-faint); font-size: .77rem; text-align: center;
}
.footer p { margin: .3rem 0; }

/* ================================ MODAL ================================ */

.modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
  background: rgba(0,0,0,.82); backdrop-filter: blur(4px);
  animation: modalIn .2s var(--ease);
}
@keyframes modalIn { from{opacity:0} to{opacity:1} }
.modal.closing { animation: modalOut .2s var(--ease) forwards; }
@keyframes modalOut { to{opacity:0} }
.modal-content {
  position: relative; width: 100%; max-width: 470px; max-height: 90vh; overflow-y: auto;
  padding: 1.8rem; background: var(--bg-raised);
  border: 1px solid var(--p); border-radius: 10px;
  box-shadow: 0 24px 80px rgba(0,0,0,.75), 0 0 50px rgba(242,169,0,.1);
  animation: modalPop .26s var(--ease);
}
@keyframes modalPop { from{transform:scale(.94) translateY(8px)} to{transform:none} }
.modal-close {
  position: absolute; top: .5rem; right: .8rem;
  background: none; border: none; color: var(--p);
  font-size: 1.7rem; line-height: 1; cursor: pointer; font-family: inherit;
}
.modal-close:hover { color: #fff; }
.modal-title { color: var(--p); text-shadow: var(--glow-p); font-size: 1.08rem; margin: 0 0 .3rem; }
.modal-sub { color: var(--fg-dim); font-size: .81rem; margin: 0 0 1.3rem; }

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: .3rem; color: var(--s); font-size: .77rem; }
.form-group input, .form-group textarea {
  width: 100%; padding: .55rem .7rem;
  background: var(--bg-sunken); border: 1px solid var(--border-lit);
  border-radius: 4px; color: var(--fg); font-family: inherit; font-size: .86rem;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.form-group input:focus, .form-group textarea:focus {
  outline: none; border-color: var(--p); box-shadow: 0 0 0 3px rgba(242,169,0,.12);
}
.form-group textarea { resize: vertical; min-height: 100px; }
.honeypot { position: absolute !important; left: -9999px; opacity: 0; height: 0; width: 0; }
#contactSubmit { width: 100%; margin-top: .4rem; }
#contactSubmit:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.form-message { margin-top: 1rem; padding: .7rem; border-radius: 4px; font-size: .81rem; text-align: center; }
.form-pending { color: var(--fg-dim); border: 1px solid var(--border-lit); }
.form-success { color: var(--s); border: 1px solid var(--s); background: rgba(0,255,65,.07); }
.form-error   { color: var(--red); border: 1px solid var(--red); background: rgba(255,85,85,.07); }

/* ============================== SCROLLBARS ============================= */

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: var(--bg-sunken); }
::-webkit-scrollbar-thumb { background: var(--border-lit); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--p); }
* { scrollbar-width: thin; scrollbar-color: var(--border-lit) var(--bg-sunken); }

/* ============================== RESPONSIVE ============================= */

@media (max-width: 860px) {
  .topbar-nav { display: none; }
}

@media (max-width: 620px) {
  body { font-size: 14px; }
  .tty { padding: 0; }
  .tty-chrome { border-radius: 0; border-left: none; border-right: none; padding-right: 9rem; }
  .tty-title { display: none; }
  .tty-scroll { border-radius: 0; border-left: none; border-right: none; font-size: 12px; }
  .tty-keys { padding: .5rem .6rem calc(.5rem + env(safe-area-inset-bottom)); }
  .viewbar { top: .45rem; right: .5rem; }
  .vb-btn { padding: .38rem .6rem; font-size: .68rem; }
  .section { padding: 2.5rem 1rem; }
  .project-grid, .skill-clusters { grid-template-columns: 1fr; }
  .timeline { padding-left: 1.1rem; }
  .tl-item::before { left: -1.1rem; }
  .ach-item { flex-wrap: wrap; }
  .ach-date { margin-left: 0; width: 100%; }
  .crt-scanlines { opacity: .3; }
  .modal-content { padding: 1.4rem; }
}

@media (max-width: 380px) {
  .actions .btn { width: 100%; text-align: center; }
}

/* ========================= REDUCED MOTION / PRINT ====================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  #matrixCanvas { display: none; }
}

@media print {
  #matrixCanvas, .crt-scanlines, .crt-vignette, .viewbar, .tty, .modal { display: none !important; }
  body { background: #fff; color: #000; }
  body[data-view="tty"] .doc { display: block !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
