/* ===== SAFE ROOM OS — srn's portfolio =====
   a survival-horror save room run on an old terminal. pink on void. */

:root {
  --void: #0a0d14;
  --panel: rgba(13, 17, 26, 0.8);
  --panel-solid: #121722;
  --line: rgba(255, 196, 201, 0.16);
  --line-strong: rgba(255, 196, 201, 0.5);
  --ink: #ece7ef;
  --dim: #9ea3b5;
  --herb: #ffc4c9;
  --moss: #8cc265;
  --caution: #f2b94b;
  --danger: #ff6b6b;
  --nosignal: #6d7386;

  --f-display: "Special Elite", "Courier New", monospace;
  --f-body: "Azeret Mono", "Cascadia Code", Consolas, ui-monospace, monospace;

  --t-xs: 11px;
  --t-sm: 12.5px;
  --t-md: 14px;
  --t-lg: 18px;
  --t-xl: clamp(26px, 3.4vw, 36px);
  --t-2xl: clamp(34px, 5.4vw, 58px);

  --gutter: clamp(16px, 4vw, 56px);
  --radius: 6px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.45);

  /* condition colour, driven by live discord status */
  --cond: var(--nosignal);
  color-scheme: dark;
}
html[data-status="online"]  { --cond: var(--moss); }
html[data-status="idle"]    { --cond: var(--caution); }
html[data-status="dnd"]     { --cond: var(--danger); }

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }

body {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--void);
  color: var(--ink);
  font: 400 var(--t-md) / 1.65 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 400;
  line-height: 1.1;
  text-wrap: balance;
}
p { margin: 0; }
a { color: var(--herb); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
strong { color: var(--ink); font-weight: 700; }
code { font-family: inherit; color: var(--herb); }
img { max-width: 100%; }

.label {
  font-size: var(--t-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--herb);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---------- scene: plain void + film grain ---------- */
.scene {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--void);
}
.scene::after { /* film grain + vignette */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0.5;
  background:
    radial-gradient(ellipse at 50% 45%, transparent 55%, rgba(0, 0, 0, 0.6) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- top bar ---------- */
.topbar {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 22px var(--gutter) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 14px;
  text-decoration: none;
  color: var(--herb);
}
.brand-mark { font-family: var(--f-display); font-size: 26px; line-height: 1; }
.brand-tag { font-size: var(--t-sm); font-style: italic; color: var(--ink); }
.brand:hover .brand-mark { color: var(--ink); }

.nav { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.nav a {
  color: var(--dim);
  text-decoration: none;
  font-size: var(--t-sm);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--herb); }
.nav a[aria-current="page"]::before { content: "› "; }

/* heartbeat pill: live discord status in the nav */
.pulse {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 10px 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--cond) !important;
  font-size: var(--t-xs) !important;
  letter-spacing: 0.12em;
  background: rgba(10, 13, 20, 0.55);
}
.pulse svg { width: 34px; height: 14px; display: block; }

/* ---------- ecg line (shared) ---------- */
.ecg polyline {
  fill: none;
  stroke: var(--cond);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.ecg .beat {
  stroke-dasharray: var(--len, 340);
  animation: ecg 2.4s linear infinite;
}
.pulse .ecg { --len: 48; }
html[data-status="idle"] .ecg .beat { animation-duration: 1.6s; }
html[data-status="dnd"] .ecg .beat  { animation-duration: 0.9s; }
.ecg .flat { display: none; }
html:not([data-status]) .ecg .beat { display: none; }
html:not([data-status]) .ecg .flat { display: inline; }
@keyframes ecg { from { stroke-dashoffset: var(--len, 340); } to { stroke-dashoffset: 0; } }

/* ---------- main shell ---------- */
main {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px var(--gutter) 72px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* ---------- home: save note + mascot ---------- */
.home {
  display: grid;
  grid-template-columns: minmax(0, 660px) minmax(0, 1fr);
  gap: 32px;
  align-items: end;
  min-height: calc(100svh - 160px);
}
.note { display: grid; gap: 22px; align-self: center; }
.note-head { display: grid; gap: 8px; }
.note h1 { font-size: var(--t-2xl); color: var(--herb); }
.note-body { display: grid; gap: 14px; max-width: 64ch; }
.note-body p { color: var(--ink); }
.hl { color: var(--herb); font-style: italic; }
.tech { border-bottom: 1px dotted var(--line-strong); }

.flavor {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-style: italic;
  color: var(--dim);
}
.flavor svg { width: 30px; height: 30px; flex: none; color: var(--herb); }

.contact { display: grid; gap: 12px; }
.contact h2 { font-size: var(--t-lg); color: var(--herb); }
.contact h2 span { font-family: var(--f-body); font-size: var(--t-sm); color: var(--dim); }

/* social slots: inventory-style frames around brand marks */
.slots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.slot {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(10, 13, 20, 0.6);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.slot::before, .slot::after { /* corner brackets */
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border: 1px solid var(--herb);
  opacity: 0;
  transition: opacity 0.15s ease;
}
.slot::before { top: -3px; left: -3px; border-right: 0; border-bottom: 0; }
.slot::after { bottom: -3px; right: -3px; border-left: 0; border-top: 0; }
.slot:hover, .slot:focus-visible {
  border-color: var(--line-strong);
  background: rgba(255, 196, 201, 0.07);
  transform: translateY(-2px);
  color: var(--herb);
}
.slot:hover::before, .slot:hover::after,
.slot:focus-visible::before, .slot:focus-visible::after { opacity: 1; }
.slot svg { width: 20px; height: 20px; fill: currentColor; }

.signoff { color: var(--herb); font-style: italic; }

/* mascot */
.mascot {
  position: sticky;
  bottom: 12px;
  justify-self: center;
  align-self: end;
  display: grid;
  justify-items: center;
  margin: 0;
}
.mascot-btn {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.mascot img {
  display: block;
  height: clamp(200px, 40vh, 400px);
  width: auto;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.55));
  transform-origin: 50% 100%;
  animation: bob 4.5s ease-in-out infinite;
}
.mascot-btn:hover img { animation-duration: 1.4s; }
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-6px) rotate(-1deg); }
}
.mascot-shadow {
  width: 46%;
  height: 14px;
  margin-top: -8px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.6), transparent);
}
.bubble {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  translate: -30% 0;
  max-width: 260px;
  width: max-content;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px 10px 10px 2px;
  background: var(--panel-solid);
  box-shadow: var(--shadow);
  font-size: var(--t-sm);
  font-style: italic;
  color: var(--ink);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.bubble.show { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
  .home { grid-template-columns: 1fr; min-height: 0; gap: 8px; }
  .home .mascot img { height: 110px; }
  .home .bubble { right: 100%; left: auto; bottom: 40%; translate: 0 0; border-radius: 10px 10px 2px 10px; }
}

/* ---------- projects: inventory ---------- */
.inv-head { display: grid; gap: 8px; margin-bottom: 22px; }
.inv-head h1 { font-size: var(--t-xl); color: var(--herb); }
.inv-head p { color: var(--dim); max-width: 62ch; }

.inventory {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 24px;
  align-items: start;
}
.inv-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 14px;
  list-style: none;
}
.item {
  position: relative;
  display: grid;
  grid-template-rows: auto auto;
  justify-items: center;
  gap: 6px;
  width: 100%;
  padding: 12px 8px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(10, 13, 20, 0.55);
  color: var(--ink);
  font: inherit;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.item img {
  width: 100%;
  max-width: 96px;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.5));
  transition: transform 0.2s ease;
}
.item-name {
  font-size: var(--t-xs);
  line-height: 1.35;
  color: var(--dim);
  text-wrap: balance;
}
.item-desc { display: none; }
.item::before, .item::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1.5px solid var(--herb);
  opacity: 0;
  transition: opacity 0.15s ease;
}
.item::before { top: -4px; left: -4px; border-right: 0; border-bottom: 0; }
.item::after { bottom: -4px; right: -4px; border-left: 0; border-top: 0; }
.item:hover, .item[aria-selected="true"] {
  border-color: var(--line-strong);
  background: rgba(255, 196, 201, 0.06);
}
.item:hover img, .item[aria-selected="true"] img { transform: scale(1.06) rotate(-2deg); }
.item[aria-selected="true"]::before, .item[aria-selected="true"]::after { opacity: 1; }
.item[aria-selected="true"] .item-name { color: var(--herb); }

.examine {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 14px;
  padding: 20px;
}
.examine-peek {
  position: absolute;
  right: 18px;
  bottom: 100%;
  width: 110px;
  height: auto;
  margin-bottom: -6px;
  pointer-events: none;
}
.examine-art {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  border-radius: 4px;
  background:
    radial-gradient(circle at 50% 55%, rgba(255, 196, 201, 0.14), transparent 62%),
    rgba(10, 13, 20, 0.5);
}
.examine-art img {
  width: 62%;
  aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.55));
  animation: turn 6s ease-in-out infinite;
}
@keyframes turn {
  0%, 100% { transform: rotate(-3deg) translateY(0); }
  50% { transform: rotate(3deg) translateY(-4px); }
}
.examine h2 { font-size: 22px; color: var(--herb); }
.examine-desc { color: var(--ink); }
.examine-meta {
  display: flex;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: var(--t-xs);
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1100px) {
  .inv-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .inventory { grid-template-columns: 1fr; }
  .examine { display: none; }
  .inv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 10px; }
  .item { grid-template-columns: 56px minmax(0, 1fr); grid-template-rows: auto; justify-items: start; text-align: left; align-items: center; gap: 10px; }
  .item img { max-width: 56px; grid-row: span 2; }
  .item-name { font-size: var(--t-sm); color: var(--herb); }
  .item-desc { display: block; font-size: var(--t-xs); color: var(--dim); line-height: 1.45; }
}
@media (max-width: 520px) {
  .inv-grid { grid-template-columns: 1fr; }
}

/* ---------- /now: condition monitor ---------- */
.now {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
  max-width: 1040px;
}
.now-head { grid-column: 1 / -1; display: grid; gap: 8px; margin-bottom: 4px; }
.now-head h1 { font-size: var(--t-xl); color: var(--herb); }
.now-head p { color: var(--dim); }

.profile { overflow: hidden; display: flex; flex-direction: column; }
.profile-banner {
  height: 96px;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 196, 201, 0.45), transparent 50%),
    radial-gradient(circle at 80% 60%, rgba(140, 194, 101, 0.3), transparent 50%),
    linear-gradient(120deg, #1d1630, #12192b 60%, #2a1622);
  background-size: cover;
  background-position: center;
}
.profile-head {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  padding: 10px 18px 0;
}
.avatar-wrap { position: relative; flex: none; margin-top: -48px; }
.avatar {
  display: block;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--void);
  border: 4px solid var(--panel-solid);
}
.avatar-dot {
  position: absolute;
  right: 2px;
  bottom: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--cond);
  border: 3px solid var(--panel-solid);
}
.profile-id { padding-bottom: 6px; min-width: 0; }
.profile-name { font-family: var(--f-display); font-size: 24px; line-height: 1.1; color: var(--ink); }
.profile-user { font-size: var(--t-sm); color: var(--dim); }
.profile-custom {
  margin: 14px 18px 0;
  padding: 8px 10px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.3);
  font-size: var(--t-sm);
  font-style: italic;
}

.condition { padding: 16px 18px 18px; display: grid; gap: 6px; margin-top: auto; }
.cond-row { display: flex; justify-content: space-between; align-items: baseline; }
.cond-word { font-family: var(--f-display); font-size: 30px; line-height: 1; color: var(--cond); }
.condition .ecg { width: 100%; height: auto; display: block; }

.equipped { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px; min-width: 0; }
.acts { display: flex; flex-direction: column; gap: 12px; flex: 1; justify-content: center; }
.act {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(10, 13, 20, 0.5);
}
.act-art {
  width: 60px;
  height: 60px;
  flex: none;
  border-radius: 4px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.05);
}
.act-info { min-width: 0; flex: 1; display: grid; gap: 1px; }
.act-label { font-size: var(--t-xs); letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.act-name, .act-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-name { font-weight: 700; color: var(--ink); }
.act-sub { font-size: var(--t-sm); color: var(--dim); }
.act-progress { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.act-bar { position: relative; flex: 1; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.14); overflow: hidden; }
.act-bar i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--herb); transition: width 0.9s linear; }
.act-time { font-size: var(--t-xs); color: var(--dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.act-idle { color: var(--dim); font-style: italic; }

.now-mascot { display: flex; align-items: flex-end; gap: 16px; margin-top: auto; }
.now-mascot img { height: 150px; width: auto; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.5)); }
.now-mascot p { font-size: var(--t-sm); font-style: italic; color: var(--dim); padding-bottom: 16px; }

.connections { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 18px 0; margin: 0; list-style: none; }
.connections .slot { width: 40px; height: 40px; }
.connections .slot svg { width: 18px; height: 18px; }

@media (max-width: 760px) {
  .now { grid-template-columns: 1fr; }
  .now-mascot img { height: 110px; }
}

/* skeletons while live data loads */
.skel {
  position: relative;
  overflow: hidden;
  display: block;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
}
.skel::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  animation: shimmer 1.3s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }
.skel-art { width: 60px; height: 60px; flex: none; }
.skel-line { height: 11px; margin: 4px 0; }
.w70 { width: 70%; } .w40 { width: 40%; }
.is-loading .avatar { opacity: 0; }
.is-loading .avatar-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

/* ---------- 404 ---------- */
.lost {
  min-height: calc(100svh - 200px);
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  text-align: center;
}
.lost img { height: clamp(140px, 26vh, 240px); width: auto; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.55)); }
.lost h1 { font-size: var(--t-2xl); color: var(--danger); letter-spacing: 0.04em; }
.lost p { color: var(--dim); max-width: 46ch; }
.lost-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: rgba(10, 13, 20, 0.6);
  color: var(--ink);
  font: inherit;
  font-size: var(--t-sm);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: rgba(255, 196, 201, 0.1); color: var(--herb); }
.btn.primary { border-color: var(--herb); color: var(--herb); }
.btn.primary::before { content: "›"; }

/* ---------- footer dock ---------- */
.dock {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 var(--gutter) 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px 20px;
  flex-wrap: wrap;
}
.corner-note { font-size: var(--t-xs); font-style: italic; color: var(--dim); }
.controls { display: flex; flex-wrap: wrap; gap: 6px; }
.toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(10, 13, 20, 0.6);
  color: var(--dim);
  font: inherit;
  font-size: var(--t-xs);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.toggle svg { width: 14px; height: 14px; shape-rendering: crispEdges; fill: currentColor; }
.toggle:hover { color: var(--ink); border-color: var(--line-strong); }
.toggle[aria-pressed="true"] { color: var(--herb); border-color: var(--line-strong); }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  bottom: 64px;
  left: 50%;
  z-index: 100;
  padding: 10px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--panel-solid);
  box-shadow: var(--shadow);
  font-size: var(--t-sm);
  font-style: italic;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast::before { content: "› "; color: var(--herb); font-style: normal; }

/* ---------- terminal ---------- */
.terminal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  background: rgba(6, 8, 13, 0.95);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}
.terminal[hidden] { display: none; }
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-size: var(--t-xs);
  color: var(--dim);
}
.terminal-bar img { width: 22px; height: 22px; object-fit: contain; }
.terminal-close { margin-left: auto; }
.terminal-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  font-size: 13px;
  line-height: 1.6;
}
.terminal-line { white-space: pre-wrap; word-break: break-word; }
.terminal-line.c-accent { color: var(--herb); }
.terminal-line.c-ok { color: var(--moss); }
.terminal-form { display: flex; align-items: center; gap: 10px; padding: 12px 16px 22px; }
.terminal-prompt { color: var(--herb); white-space: nowrap; }
.terminal-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}

/* ---------- boot sequence ---------- */
.boot {
  position: fixed;
  inset: 0;
  z-index: 9500;
  padding: 42px var(--gutter);
  overflow: hidden;
  background: var(--void);
  font-size: 13px;
  line-height: 1.8;
  cursor: pointer;
  transition: opacity 0.5s ease;
}
.boot.done { opacity: 0; pointer-events: none; }
.boot .ok { color: var(--moss); }
.boot .cursor::after { content: "▋"; margin-left: 1px; animation: blink 1s step-start infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- crt mode ---------- */
.crt-overlay { display: none; }
html.crt-on .crt-overlay {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 8000;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, 0.18) 3px, transparent 4px);
  animation: flicker 0.16s infinite;
}
html.crt-on .crt-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 58%, rgba(0, 0, 0, 0.55) 100%);
}
html.crt-on body { text-shadow: 0 0 6px rgba(255, 196, 201, 0.25); }
@keyframes flicker { 0% { opacity: 0.93; } 50% { opacity: 1; } 100% { opacity: 0.95; } }

/* ---------- crosshair cursor ---------- */
body.cursor-cross,
body.cursor-cross * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cg fill='none' stroke='%23ffc4c9' stroke-width='1.5'%3E%3Ccircle cx='16' cy='16' r='9'/%3E%3Cpath d='M16 1v8M16 23v8M1 16h8M23 16h8'/%3E%3C/g%3E%3Ccircle cx='16' cy='16' r='1.6' fill='%23ffc4c9'/%3E%3C/svg%3E") 16 16, crosshair;
}

/* ---------- konami ---------- */
body.konami { animation: herbtrip 4s ease; }
@keyframes herbtrip {
  0%, 100% { filter: none; }
  20%, 80% { filter: hue-rotate(85deg) saturate(1.6); }
}
.herb {
  position: fixed;
  top: -60px;
  z-index: 9999;
  width: 40px;
  pointer-events: none;
  will-change: transform;
  animation: fall linear forwards;
}
@keyframes fall { to { transform: translateY(115vh) rotate(360deg); opacity: 0.2; } }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .ecg .beat { stroke-dasharray: none; }
}

/* ---------- cast: character art + typewritten file tags ---------- */
.cast {
  position: relative;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  min-height: 0;
}
.cast-img {
  display: block;
  height: 340px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.6));
}
.file-tag {
  position: absolute;
  bottom: 34%;
  left: 0;
  max-width: 190px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--herb);
  border-radius: 2px;
  background: var(--panel-solid);
  box-shadow: var(--shadow);
  font-size: var(--t-xs);
  font-style: italic;
  line-height: 1.45;
  color: var(--dim);
  transform: rotate(-2deg);
}
.file-tag .label { display: block; margin-bottom: 3px; font-style: normal; color: var(--herb); }

/* sprout tags along at the character's feet */
.cast .mascot {
  position: absolute;
  left: 0;
  bottom: 0;
  justify-self: start;
}
.cast .mascot img { height: clamp(90px, 17vh, 170px); }
.cast .bubble { left: 30%; translate: 0 0; }

.note-foot { display: grid; gap: 14px; padding-top: 18px; border-top: 1px solid var(--line); }
.note-foot .flavor { padding-top: 0; border-top: 0; }

.lost-scene { display: flex; align-items: flex-end; justify-content: center; gap: 4px; }
.lost-scene .lost-medic { height: clamp(170px, 30vh, 300px); width: auto; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.55)); }
.lost-scene .lost-sprout { height: clamp(90px, 15vh, 160px); width: auto; }

@media (max-width: 899px) {
  .home .cast { order: -1; }
  .home .cast-img { height: 300px; }
  .home .cast .mascot { left: auto; right: 0; }
  .cast-side { margin-top: 12px; }
  .cast-side .cast-img { height: 300px; }
  .file-tag { max-width: 160px; }
}

/* ---------- one screen, no scrolling (laptop and up) ----------
   type and art scale with the window height so each page fits exactly */
@media (min-width: 900px) and (min-height: 600px) {
  :root {
    --t-md: clamp(12px, 0.35vw + 0.9vh, 14.5px);
    --t-sm: calc(var(--t-md) - 1.5px);
    --t-xs: calc(var(--t-md) - 3px);
  }
  body { height: 100svh; min-height: 0; }
  .topbar { padding-top: 2.4vh; }
  main {
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding-top: 2vh;
    padding-bottom: 1.2vh;
  }
  .dock { padding-bottom: 1.6vh; }

  /* home */
  .home {
    flex: 1;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 30%);
    align-items: stretch;
    gap: 3vw;
  }
  .note { align-self: center; gap: 2vh; }
  .note h1 { font-size: clamp(30px, 6vh, 56px); }
  .note-body { display: block; columns: 2; column-gap: 2.4vw; max-width: none; line-height: 1.55; }
  .note-body p + p { margin-top: 1.2vh; }
  .note-foot {
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 1.4vh 28px;
    padding-top: 1.8vh;
  }
  .note-foot .flavor { grid-column: 1 / -1; }
  .contact { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
  .slot { width: clamp(34px, 5vh, 46px); height: clamp(34px, 5vh, 46px); }
  .home .cast { height: 100%; }
  /* the art fills whatever height its column has, never more */
  .cast-img { flex: 1 1 0; min-height: 0; width: 100%; height: auto; object-fit: contain; object-position: center bottom; }
  .condition .ecg { --len: 420; }

  /* projects */
  .inv-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; margin-bottom: 1.6vh; }
  .inv-head h1 { font-size: clamp(24px, 4.4vh, 36px); }
  .inv-head .label { flex-basis: 100%; }
  .inventory {
    flex: 1;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) minmax(250px, 300px);
    align-items: stretch;
    gap: 18px;
  }
  .inv-grid {
    height: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: repeat(4, minmax(0, 1fr));
    gap: 1vh;
    padding: 1.2vh;
  }
  .item { min-height: 0; display: flex; flex-direction: column; padding: 0.8vh 6px; gap: 0.4vh; }
  .item img { flex: 1 1 0; min-height: 0; width: 100%; max-width: none; height: auto; aspect-ratio: auto; }
  .item-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .examine { position: relative; top: auto; height: 100%; display: flex; flex-direction: column; gap: 1.2vh; padding: 2vh 18px; }
  .examine-art { flex: 1; min-height: 0; aspect-ratio: auto; }
  .examine-art img { width: auto; height: 78%; max-width: 72%; }
  .examine h2 { font-size: clamp(16px, 2.6vh, 22px); }
  .examine-peek { width: clamp(70px, 11vh, 110px); }
  .inventory .cast-side { display: none; }

  /* /now */
  .now {
    flex: 1;
    min-height: 0;
    max-width: none;
    grid-template-columns: minmax(0, 330px) minmax(0, 1fr) minmax(200px, 26%);
    grid-template-rows: auto minmax(0, 1fr);
    align-items: stretch;
  }
  .now-head { grid-column: 1 / 3; }
  .now .cast-side { grid-column: 3; grid-row: 1 / span 2; height: 100%; }
  .profile, .equipped { min-height: 0; overflow: hidden; }
  .profile-banner { height: clamp(60px, 11vh, 96px); }
  .now-mascot img { height: clamp(90px, 16vh, 150px); }

  /* 404 */
  .lost { min-height: 0; flex: 1; gap: 1.6vh; }
  .lost h1 { font-size: clamp(30px, 6.5vh, 58px); }
}
@media (min-width: 1200px) and (min-height: 600px) {
  .inventory { grid-template-columns: minmax(0, 1fr) minmax(250px, 300px) minmax(170px, 17%); }
  .inventory .cast-side { display: flex; height: 100%; }
}

/* sprout on his own (no character beside him) sits in the normal flow */
.cast .mascot:only-child { position: relative; left: auto; bottom: auto; justify-self: center; }

/* home: one centred block, like the original layout; sprout keeps to the corner */
@media (min-width: 900px) and (min-height: 600px) {
  .home { position: relative; grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .home .note { width: min(100%, 1120px); align-self: center; }
  .home .cast { position: absolute; right: 0; bottom: 0; height: auto; }
}

/* sprout sits at the right end of the "Hello." row; his bubble opens to the left */
.note-head { position: relative; }
.note-head .mascot {
  position: absolute;
  right: 0;
  bottom: 0;
  justify-self: auto;
  align-self: auto;
}
.note-head .mascot img { height: clamp(80px, 13vh, 130px); }
.note-head .bubble { left: auto; right: 100%; bottom: 30%; translate: 0 0; border-radius: 10px 10px 2px 10px; margin-right: 6px; }
@media (max-width: 899px) {
  .note-head .mascot img { height: 72px; }
}

/* ---------- contact block: three rows on one left edge ----------
   flavor line / heading + sign-off / icon row */
.note-foot { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.note-foot .flavor { display: flex; align-items: center; gap: 10px; margin: 0; }
.note-foot .flavor svg { width: 20px; height: 14px; flex: none; }
.contact { display: grid; gap: 10px; }
.contact-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 16px;
}
.contact-head h2, .contact-head .signoff { margin: 0; }
.slot svg.px { width: 24px; height: 24px; }
.connections .slot svg.px { width: 24px; height: 24px; }

@media (min-width: 900px) and (min-height: 600px) {
  .note-foot { grid-template-columns: minmax(0, 1fr); gap: 1.6vh; }
  .note-foot .flavor { grid-column: auto; }
  .contact { grid-column: auto; display: grid; gap: 1.2vh; }
  .slots { gap: 10px; }
}
.contact h2, .contact .signoff { margin: 0; }

/* ---------- wallpaper: one portrait pinned to each edge, empty middle ---------- */
@property --mx { syntax: "<length>"; inherits: true; initial-value: -2000px; }
@property --my { syntax: "<length>"; inherits: true; initial-value: -2000px; }
.scene {
  background:
    url("/assets/img/bg/face-left-1080.webp") left -18vw center / auto 100% no-repeat,
    url("/assets/img/bg/sherry-right-1080.webp") right -8vw center / auto 100% no-repeat,
    var(--void);
}
@media (min-height: 1081px), (min-resolution: 1.5dppx) {
  .scene {
    background-image:
      url("/assets/img/bg/face-left-2160.webp"),
      url("/assets/img/bg/sherry-right-2160.webp");
  }
}
/* tint over everything, lifted in a soft circle wherever the cursor is */
/* The tint is one solid layer; a soft hole that follows the cursor lets the art through. */
.scene::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(10, 13, 20, 0.86);
  -webkit-mask: radial-gradient(circle 340px at var(--mx) var(--my), rgba(0, 0, 0, 0.35), #000 100%);
  mask: radial-gradient(circle 340px at var(--mx) var(--my), rgba(0, 0, 0, 0.35), #000 100%);
}
@media (max-width: 899px) {
  .scene { background-size: auto 70%, auto 70%, auto; background-position: left top, right bottom, 0 0; }
  .scene::before { background: rgba(10, 13, 20, 0.86); }
}

/* ---------- home: single centred reading column, like a blog post ---------- */
@media (min-width: 900px) and (min-height: 600px) {
  .home .note {
    width: min(100%, 70ch);
    font-size: calc(var(--t-md) * var(--fit, 1));
    gap: 1.8vh;
  }
  .home .note .note-body { columns: 1; line-height: 1.6; }
  .home .note .note-body p + p { margin-top: 1.1em; }
  .home .note h1 { font-size: clamp(28px, 5vh, 46px); }
  .home .note .note-foot { gap: 1.4vh; }
}

/* home: centred text, every row centred on the same axis */
.home .note { text-align: center; }
.home .note-head { justify-items: center; }
.home .note-body { margin-inline: auto; }
.home .note-foot .flavor { justify-content: center; }
.home .slots { justify-content: center; }

/* ---------- projects: one centred block, like the home page ---------- */
.page-projects .inv-head { justify-content: center; justify-items: center; text-align: center; }
@media (min-width: 900px) and (min-height: 600px) {
  .page-projects .inventory,
  .page-projects .inventory { grid-template-columns: minmax(0, 660px) minmax(250px, 300px); justify-content: center; }

}
.page-projects .inv-head { display: flex; flex-direction: column; flex-wrap: nowrap; align-items: center; gap: 4px; }
.page-projects .inv-head > * { flex-basis: auto; }

/* ---------- projects: pixel item icons, same look as the home page's social slots ---------- */
.item { background: rgba(10, 13, 20, 0.6); color: var(--ink); }
.item svg.px-item {
  display: block;
  width: 48px;
  height: 48px;
  fill: currentColor;
  transition: transform 0.15s ease;
}
.item:hover, .item[aria-selected="true"] { color: var(--herb); background: rgba(255, 196, 201, 0.07); }
.item:hover svg.px-item, .item[aria-selected="true"] svg.px-item { transform: translateY(-2px); }
.examine-art svg.px-item {
  width: min(160px, 60%);
  height: auto;
  aspect-ratio: 1;
  fill: var(--herb);
  animation: none;
}
@media (min-width: 900px) and (min-height: 600px) {
  /* icon fills the tile's free height in whole 16px steps so pixels stay crisp */
  .item { justify-content: center; }
  .item svg.px-item { flex: none; width: clamp(32px, 6vh, 64px); height: clamp(32px, 6vh, 64px); }
}
@media (max-width: 820px) {
  .item svg.px-item { width: 40px; height: 40px; grid-row: span 2; }
}
@media (min-width: 821px) {
  .item { align-items: center; text-align: center; }
}
@media (min-width: 900px) and (min-height: 600px) {
  .inv-grid { grid-template-rows: repeat(5, minmax(0, 1fr)); }
}

/* ---------- projects: 6 x 5 item box, two free slots ---------- */
.item-empty {
  border: 1px dashed var(--line);
  border-radius: 4px;
  background: rgba(10, 13, 20, 0.3);
}
@media (min-width: 900px) and (min-height: 600px) {
  .page-projects .inventory { grid-template-columns: minmax(0, 880px) minmax(250px, 300px); }
  .inv-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: repeat(5, minmax(0, 1fr)); gap: 0.9vh; }
  .item { padding: 0.6vh 4px; }
  .item svg.px-item { width: clamp(28px, 5vh, 48px); height: clamp(28px, 5vh, 48px); }
  .item-name { font-size: calc(var(--t-xs) - 0.5px); line-height: 1.3; }
}
@media (max-width: 820px) {
  .item-empty { display: none; }
}

/* ---------- /now: one centred block, panels sized to content ---------- */
.page-now .now-head { justify-items: center; text-align: center; }
.page-now .now { justify-content: center; margin-inline: auto; width: 100%; }
@media (min-width: 900px) and (min-height: 600px) {
  .page-now .now {
    grid-template-columns: minmax(0, 330px) minmax(0, 560px);
    grid-template-rows: auto auto;
    align-content: center;
  }
  .page-now .now-head { grid-column: 1 / -1; }
  .page-now .profile .condition { margin-top: 18px; }
  .page-now .acts { justify-content: flex-start; }
}

/* ---------- nav: discord avatar with live status dot ---------- */
.nav-avatar {
  position: relative;
  display: inline-block;
  flex: none;
  width: 34px;
  height: 34px;
  padding: 0 !important;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--panel-solid);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.nav-avatar:hover { border-color: var(--herb); box-shadow: 0 0 0 3px rgba(255, 196, 201, 0.15); }
.nav-avatar::before { content: none !important; }
.nav-avatar img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.nav-avatar img[hidden] { display: none; }
.nav-avatar-dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--cond);
  border: 2px solid var(--void);
}

/* ---------- page loader: 3s spin + zoom + shake + glitch, pure CSS ----------
   runs on every page load and removes itself (visibility: hidden) at the end */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9800;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 4vh;
  background: var(--void);
  overflow: hidden;
  animation: loader-out 3s ease forwards;
}
.loader-stage {
  position: relative;
  width: min(36vmin, 300px);
  aspect-ratio: 1;
  animation:
    loader-zoom 3s cubic-bezier(0.6, 0, 0.4, 1) forwards,
    loader-shake 3s linear forwards;
}
.loader-mark {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: loader-spin 3s cubic-bezier(0.45, 0, 0.2, 1) forwards;
}
.loader-mark:not(.loader-ghost) {
  animation:
    loader-spin 3s cubic-bezier(0.45, 0, 0.2, 1) forwards,
    loader-hit 3s steps(1) forwards;
}
@keyframes loader-hit {
  0% { filter: none; }
  35% { filter: brightness(1.8) saturate(1.4); }
  37% { filter: brightness(0.7); }
  39% { filter: none; }
  61% { filter: brightness(2) saturate(1.5); }
  63% { filter: brightness(0.6); }
  65% { filter: none; }
}
.loader-ghost { opacity: 0; mix-blend-mode: screen; }
.loader-ghost.g1 {
  filter: sepia(1) saturate(8) hue-rotate(150deg);
  animation: loader-spin 3s cubic-bezier(0.45, 0, 0.2, 1) forwards, loader-glitch-a 3s steps(1) forwards;
}
.loader-ghost.g2 {
  filter: sepia(1) saturate(8) hue-rotate(-40deg);
  animation: loader-spin 3s cubic-bezier(0.45, 0, 0.2, 1) forwards, loader-glitch-b 3s steps(1) forwards;
}
.loader-text {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--dim);
  animation: loader-text 3s steps(1) forwards;
}

@keyframes loader-out {
  0%, 86% { opacity: 1; visibility: visible; }
  100% { opacity: 0; visibility: hidden; }
}
@keyframes loader-zoom {
  0% { transform: scale(1); filter: none; opacity: 1; }
  6% { transform: scale(1.18); }
  12% { transform: scale(0.94); }
  18% { transform: scale(1); }
  80% { transform: scale(1); filter: blur(0); opacity: 1; }
  100% { transform: scale(3.4); filter: blur(8px); opacity: 0; }
}
@keyframes loader-spin {
  0% { rotate: -180deg; }
  72% { rotate: 540deg; }
  100% { rotate: 720deg; }
}
@keyframes loader-shake {
  0%, 33%, 46%, 59%, 72%, 100% { translate: 0 0; }
  35% { translate: -18px 8px; }
  37% { translate: 16px -10px; }
  39% { translate: -14px -8px; }
  41% { translate: 18px 10px; }
  43% { translate: -10px 6px; }
  45% { translate: 6px -4px; }
  61% { translate: 20px -8px; }
  63% { translate: -20px 10px; }
  65% { translate: 14px 12px; }
  67% { translate: -12px -10px; }
  69% { translate: 8px 6px; }
  71% { translate: -4px -2px; }
}
@keyframes loader-glitch-a {
  0% { opacity: 0; }
  34% { opacity: 0.85; transform: translate(-12px, 0); clip-path: inset(8% 0 62% 0); }
  36% { opacity: 0.85; transform: translate(10px, 0); clip-path: inset(52% 0 22% 0); }
  38% { opacity: 0.7; transform: translate(-6px, 2px); clip-path: inset(30% 0 48% 0); }
  40% { opacity: 0; }
  60% { opacity: 0.9; transform: translate(14px, -3px); clip-path: inset(28% 0 46% 0); }
  62% { opacity: 0.9; transform: translate(-10px, 2px); clip-path: inset(68% 0 6% 0); }
  64% { opacity: 0.8; transform: translate(8px, 0); clip-path: inset(4% 0 80% 0); }
  66% { opacity: 0; }
  82% { opacity: 0.75; transform: translate(-8px, 0); clip-path: inset(40% 0 40% 0); }
  84% { opacity: 0; }
}
@keyframes loader-glitch-b {
  0% { opacity: 0; }
  35% { opacity: 0.85; transform: translate(12px, 0); clip-path: inset(60% 0 12% 0); }
  37% { opacity: 0.85; transform: translate(-14px, 0); clip-path: inset(18% 0 58% 0); }
  39% { opacity: 0; }
  61% { opacity: 0.9; transform: translate(-16px, 2px); clip-path: inset(46% 0 30% 0); }
  63% { opacity: 0.9; transform: translate(12px, -2px); clip-path: inset(10% 0 70% 0); }
  65% { opacity: 0.8; transform: translate(-6px, 0); clip-path: inset(78% 0 2% 0); }
  67% { opacity: 0; }
  83% { opacity: 0.75; transform: translate(10px, 0); clip-path: inset(20% 0 64% 0); }
  85% { opacity: 0; }
}
@keyframes loader-text {
  0% { opacity: 0; }
  14% { opacity: 1; }
  35% { opacity: 0.2; transform: translateX(-4px); }
  37% { opacity: 1; transform: none; }
  61% { opacity: 0.1; transform: translateX(5px); }
  63% { opacity: 1; transform: none; }
  80% { opacity: 0; }
}

/* ---------- projects: background portraits sway in and out so both stay visible ---------- */
@media (min-width: 900px) and (min-height: 600px) and (prefers-reduced-motion: no-preference) {
  .page-projects .scene { animation: bg-sway 10s cubic-bezier(0.45, 0, 0.25, 1) 3s both; }
}
@keyframes bg-sway {
  /* only the right portrait slides further right, clearing the examine panel; the eye stays put */
  from { background-position: left -18vw center, right -8vw center; }
  to   { background-position: left -18vw center, right -16vw center; }
}

/* ---------- projects: only the eye blinks into view once the right portrait settles ----------
   .eye-peek is a copy of the face image laid exactly over the background one (full height,
   2400:2160, at left -18vw), drawn above the tint and masked to the eye's outline, so only
   the eye opening clears up, at the same strength as the cursor light (30% tint).
   Starts at 13s (3s loader + 10s slide): 2s of fast blinking, 2s shut, repeat. */
.eye-peek { display: none; }
@media (min-width: 900px) and (min-height: 600px) and (prefers-reduced-motion: no-preference) {
  .page-projects .eye-peek {
    display: block;
    position: absolute;
    z-index: 2;
    top: 0;
    left: -18vw;
    height: 100%;
    width: calc(100vh * 2400 / 2160);
    pointer-events: none;
    background:
      linear-gradient(rgba(10, 13, 20, 0.3), rgba(10, 13, 20, 0.3)),
      url("/assets/img/bg/face-left-1080.webp") 0 0 / 100% 100% no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 2400 2160'%3E%3Cfilter id='s' x='-50%25' y='-50%25' width='200%25' height='200%25'%3E%3CfeGaussianBlur stdDeviation='32'/%3E%3C/filter%3E%3Cpath d='M905 1145C980 1050 1150 995 1300 995C1420 995 1500 1010 1545 1050C1500 1120 1400 1185 1270 1195C1120 1205 990 1185 905 1145Z' fill='white' filter='url(%23s)'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 2400 2160'%3E%3Cfilter id='s' x='-50%25' y='-50%25' width='200%25' height='200%25'%3E%3CfeGaussianBlur stdDeviation='32'/%3E%3C/filter%3E%3Cpath d='M905 1145C980 1050 1150 995 1300 995C1420 995 1500 1010 1545 1050C1500 1120 1400 1185 1270 1195C1120 1205 990 1185 905 1145Z' fill='white' filter='url(%23s)'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
    opacity: 0;
    animation: eye-blink 4s steps(1, end) 13s infinite;
  }
}
@media (min-width: 900px) and (min-height: 1081px), (min-width: 900px) and (min-resolution: 1.5dppx) {
  .page-projects .eye-peek {
    background:
      linear-gradient(rgba(10, 13, 20, 0.3), rgba(10, 13, 20, 0.3)),
      url("/assets/img/bg/face-left-2160.webp") 0 0 / 100% 100% no-repeat;
  }
}
@keyframes eye-blink {
  0%     { opacity: 1; }
  6.25%  { opacity: 0; }
  12.5%  { opacity: 1; }
  18.75% { opacity: 0; }
  25%    { opacity: 1; }
  31.25% { opacity: 0; }
  37.5%  { opacity: 1; }
  43.75% { opacity: 0; }
  50%, 100% { opacity: 0; }
}
