:root {
  color-scheme: dark;
  --terminal-bg: #000;
  --terminal-text: #f7f7f7;
  --terminal-green: #00ff2a;
  --terminal-cyan: #00d8ff;
  --terminal-red: #ff3131;
  --ink: #f6f7fb;
  --muted: #aeb4c8;
  --panel: #171a25;
  --panel-strong: #202636;
  --line: #343b4f;
  --blue: #00a8ff;
  --pink: #f400d8;
  --gold: #f0b429;
  --teal: #00c2a8;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background: #090b12;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app {
  min-height: 100vh;
}

.scene {
  min-height: 100vh;
  overflow: hidden;
  background: #050506;
  font-family: "Consolas", "Lucida Console", "Courier New", monospace;
}

.desk-scene {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #050506;
}

.scene-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform-origin: 35% 46%;
  transition: transform 760ms cubic-bezier(0.2, 0.8, 0.2, 1), filter 760ms ease;
}

.video-transition,
.transition-stage {
  min-height: 100vh;
  overflow: hidden;
  background: #020202;
}

.transition-stage {
  position: relative;
}

.transition-underlay,
.transition-poster,
.transition-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.transition-underlay {
  z-index: 0;
  filter: brightness(0.82);
  transform: scale(1.005);
}

.transition-poster {
  z-index: 1;
}

.transition-video {
  z-index: 2;
  opacity: 0;
  transition: opacity 120ms ease;
}

.transition-stage.is-ready .transition-video {
  opacity: 1;
}

.transition-label {
  position: absolute;
  z-index: 3;
  left: 24px;
  bottom: 22px;
  color: var(--terminal-green);
  font: 15px/1.3 "Consolas", "Lucida Console", "Courier New", monospace;
  text-shadow: 0 0 14px rgba(0, 255, 42, 0.42);
}

.scene.is-zoom-in .scene-bg {
  transform: scale(2.25) translate(7%, 7%);
  filter: brightness(0.82);
}

.scene.is-zoom-out .scene-bg {
  transform: scale(1.18);
  filter: brightness(0.78);
}

.scene-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.5), transparent 28%, transparent 72%, rgba(0, 0, 0, 0.35)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.28), transparent 38%, rgba(0, 0, 0, 0.5));
  pointer-events: none;
}

.scene-overlays {
  position: absolute;
  inset: 0;
  color: #f4f1d5;
  transition: opacity 220ms ease;
}

.scene.is-zoom-in .scene-overlays,
.scene.is-zoom-out .scene-overlays {
  opacity: 0;
  pointer-events: none;
}

.scene-title {
  position: absolute;
  left: 1.6vw;
  top: 2.6vh;
}

.scene-title h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 3vw, 50px);
  line-height: 1;
  letter-spacing: 1px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.85);
}

.scene-title p {
  margin: 0;
  font-size: clamp(12px, 1vw, 18px);
  color: #f3e7b8;
}

.terminal-card {
  position: absolute;
  left: 1.6vw;
  top: 13vh;
  width: min(390px, 32vw);
  min-height: 128px;
  padding: 18px 20px;
  border: 1px solid #91f05e;
  border-radius: 8px;
  background: rgba(4, 8, 7, 0.68);
  color: #a5ff69;
  box-shadow: 0 0 24px rgba(145, 240, 94, 0.12);
}

.terminal-card p {
  margin: 0 0 12px;
  font-size: clamp(15px, 1.25vw, 20px);
  line-height: 1.45;
}

.terminal-card span {
  color: #91f05e;
}

.mobile-copy,
.mobile-action-grid,
.mobile-status,
.mobile-laptop-hotspot,
.mobile-terminal-return {
  display: none;
}

.scene-hotspot {
  --accent: var(--terminal-cyan);
  --line: 40px;
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: flex;
  align-items: center;
  gap: 0;
  border: 0;
  padding: 0;
  color: #f8f4db;
  background: transparent;
  text-align: left;
  transform: translateY(-50%);
}

.hotspot-dot {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 16px var(--accent);
}

.hotspot-line {
  width: var(--line);
  height: 2px;
  background: var(--accent);
}

.scene-hotspot.is-reverse {
  flex-direction: row-reverse;
}

.scene-hotspot-usb {
  flex-direction: column-reverse;
  align-items: center;
  transform: translate(-50%, calc(-100% + 6px));
}

.scene-hotspot-usb .hotspot-line {
  width: 2px;
  height: var(--line);
}

.scene-hotspot-usb .callout {
  text-align: center;
}

.callout {
  display: grid;
  gap: 7px;
  min-width: 150px;
  padding: 13px 15px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: rgba(5, 7, 9, 0.72);
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.42);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.callout strong {
  color: var(--accent);
  font-size: clamp(14px, 1.05vw, 19px);
  letter-spacing: 0.5px;
}

.callout span {
  color: #f8f4db;
  font-size: clamp(11px, 0.85vw, 15px);
  line-height: 1.35;
}

.scene-hotspot:hover .callout,
.scene-hotspot:focus-visible .callout {
  background: rgba(8, 13, 12, 0.9);
  box-shadow: 0 0 26px color-mix(in srgb, var(--accent) 35%, transparent);
  transform: translateY(-3px);
}

.scene-hotspot:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 8px;
}

.scene-hud {
  position: absolute;
  left: 1.6vw;
  right: 1.6vw;
  bottom: 2vh;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  border: 1px solid #91f05e;
  border-radius: 8px;
  background: rgba(4, 6, 6, 0.78);
  box-shadow: 0 0 24px rgba(145, 240, 94, 0.1);
}

.scene-hud div {
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-right: 1px solid rgba(244, 241, 213, 0.42);
}

.scene-hud div:last-child {
  border-right: 0;
}

.scene-hud strong {
  color: #f8f4db;
  font-size: 15px;
}

.scene-hud span {
  color: #a5ff69;
  font-size: 14px;
}

.scene-panel {
  position: absolute;
  right: 2.4vw;
  top: 9vh;
  width: min(360px, 88vw);
  padding: 18px 20px;
  border: 1px solid #91f05e;
  border-radius: 8px;
  background: rgba(5, 7, 9, 0.88);
  box-shadow: 0 0 36px rgba(0, 0, 0, 0.55);
}

.scene-panel strong {
  display: block;
  margin-bottom: 10px;
  color: #a5ff69;
  font-size: 18px;
}

.scene-panel p {
  margin: 0;
  color: #f8f4db;
  line-height: 1.55;
}

.panel-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: 0;
  background: transparent;
  color: #f8f4db;
  font: inherit;
}

.gallery {
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 18%, rgba(0, 216, 255, 0.16), transparent 28rem),
    linear-gradient(135deg, #050607 0%, #10131a 55%, #050607 100%);
  color: #f8f4db;
  font-family: "Consolas", "Lucida Console", "Courier New", monospace;
}

.gallery-view {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 18px;
  padding: 22px clamp(18px, 3vw, 42px);
}

.gallery-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.gallery-topbar p {
  margin: 0 0 6px;
  color: var(--terminal-cyan);
  font-size: 14px;
  letter-spacing: 1px;
}

.gallery-topbar h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 56px);
  line-height: 1;
}

.gallery-back,
.gallery-controls button {
  min-height: 40px;
  border: 1px solid var(--terminal-cyan);
  border-radius: 8px;
  padding: 0 14px;
  background: rgba(5, 7, 9, 0.7);
  color: #f8f4db;
  font: inherit;
}

.gallery-stage {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 18px;
  align-items: stretch;
}

.gallery-media-shell {
  min-height: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(0, 216, 255, 0.52);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.48);
  box-shadow: 0 0 32px rgba(0, 216, 255, 0.12);
  overflow: hidden;
}

.gallery-media {
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 220px);
  object-fit: contain;
  background: #000;
}

.gallery-details {
  display: grid;
  align-content: center;
  gap: 14px;
  padding: 22px;
  border: 1px solid rgba(145, 240, 94, 0.52);
  border-radius: 8px;
  background: rgba(5, 7, 9, 0.72);
}

.gallery-details span {
  color: var(--terminal-green);
}

.gallery-details h2 {
  margin: 0;
  font-size: 28px;
}

.gallery-details p {
  margin: 0;
  color: #d8dbc8;
  line-height: 1.55;
}

.gallery-controls {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.gallery-process {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.gallery-process figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(248, 244, 219, 0.2);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.36);
}

.gallery-process img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.gallery-process figcaption {
  padding: 5px 7px;
  color: #d8dbc8;
  font-size: 11px;
}

.quality-select {
  display: grid;
  gap: 8px;
  margin-top: 4px;
  color: #d8dbc8;
}

.quality-select select {
  min-height: 40px;
  border: 1px solid rgba(0, 216, 255, 0.52);
  border-radius: 8px;
  padding: 0 12px;
  background: rgba(5, 7, 9, 0.86);
  color: #f8f4db;
  font: inherit;
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.gallery-thumb {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 68px;
  border: 1px solid rgba(248, 244, 219, 0.2);
  border-radius: 8px;
  padding: 8px;
  background: rgba(5, 7, 9, 0.7);
  color: #f8f4db;
  text-align: left;
  font: inherit;
}

.gallery-thumb.active {
  border-color: var(--terminal-cyan);
  box-shadow: 0 0 22px rgba(0, 216, 255, 0.16);
}

.gallery-thumb img {
  width: 88px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 4px;
}

.gallery-thumb span {
  overflow-wrap: anywhere;
}

.focus {
  min-height: 100vh;
  overflow: hidden;
  background: #020202;
  color: #f8f4db;
  font-family: "Consolas", "Lucida Console", "Courier New", monospace;
}

.focus-view {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: grid;
  align-items: center;
  padding: clamp(18px, 5vw, 72px);
}

.focus-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  user-select: none;
}

.focus-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.24) 46%, rgba(0, 0, 0, 0.7)),
    radial-gradient(circle at 72% 34%, color-mix(in srgb, var(--focus-accent) 18%, transparent), transparent 24rem);
}

.focus-panel {
  position: relative;
  width: min(520px, 92vw);
  display: grid;
  gap: 14px;
  padding: clamp(18px, 2.8vw, 30px);
  border: 1px solid var(--focus-accent);
  border-radius: 8px;
  background: rgba(4, 6, 7, 0.74);
  box-shadow:
    0 0 34px rgba(0, 0, 0, 0.54),
    0 0 26px color-mix(in srgb, var(--focus-accent) 18%, transparent);
}

.focus-panel > p:first-child {
  margin: 0;
  color: var(--focus-accent);
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.focus-panel h1 {
  margin: 0;
  color: #f8f4db;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1;
  letter-spacing: 0;
}

.focus-rule {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--focus-accent), transparent);
}

.focus-intro {
  margin: 0;
  color: #eef0df;
  line-height: 1.55;
}

.focus-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.focus-list li {
  position: relative;
  padding-left: 20px;
  color: #f8f4db;
}

.focus-list li::before {
  content: ">";
  position: absolute;
  left: 0;
  color: var(--focus-accent);
}

.focus-back {
  justify-self: start;
  min-height: 40px;
  margin-top: 6px;
  border: 1px solid var(--focus-accent);
  border-radius: 8px;
  padding: 0 14px;
  background: rgba(5, 7, 9, 0.72);
  color: #f8f4db;
  font: inherit;
}

.focus-back:hover,
.focus-back:focus-visible {
  background: color-mix(in srgb, var(--focus-accent) 18%, rgba(5, 7, 9, 0.88));
  outline: none;
}

.project-notebook-view {
  align-items: stretch;
  padding: 0;
}

.project-notebook-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.35), transparent 30%, transparent 70%, rgba(0, 0, 0, 0.42)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), transparent 42%, rgba(0, 0, 0, 0.24));
}

.project-notebook {
  position: absolute;
  left: 35.6%;
  top: 8.8%;
  width: 31.2%;
  height: 81.2%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(10px, 1.5vh, 16px);
  align-items: stretch;
  padding: clamp(22px, 2.2vw, 38px) clamp(26px, 2.4vw, 42px) clamp(24px, 2.4vw, 42px);
  color: #eef0cf;
  font-family: "Consolas", "Lucida Console", "Courier New", monospace;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.72);
}

.project-copy {
  display: grid;
  gap: clamp(7px, 0.9vh, 12px);
  min-width: 0;
}

.project-eyebrow {
  margin: 0;
  color: #d9ef57;
  font-size: clamp(10px, 0.75vw, 13px);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.project-copy h1 {
  margin: 0;
  color: #f6f6d8;
  font-size: clamp(21px, 2.05vw, 34px);
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.16);
}

.project-copy p {
  margin: 0;
  color: #edf0d4;
  font-size: clamp(11px, 0.9vw, 14px);
  line-height: 1.38;
}

.project-origin {
  border-left: 3px solid rgba(217, 239, 87, 0.62);
  padding-left: 9px;
  color: #f4f0b5 !important;
  font-size: clamp(10px, 0.82vw, 13px) !important;
  line-height: 1.32 !important;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-tags span {
  border: 1px solid rgba(217, 239, 87, 0.34);
  border-radius: 5px;
  padding: 3px 6px;
  background: rgba(8, 10, 8, 0.32);
  color: #f2f4cf;
  font-size: clamp(9px, 0.72vw, 12px);
  line-height: 1.2;
}

.project-demo-shell {
  justify-self: center;
  align-self: center;
  width: min(72%, 210px);
  max-height: 100%;
  aspect-ratio: 9 / 20;
  border: 2px solid rgba(12, 14, 10, 0.72);
  border-radius: 18px;
  background: #020202;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.34);
  overflow: hidden;
}

.project-demo-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.project-notes {
  justify-self: center;
  align-self: center;
  width: min(100%, 360px);
  display: grid;
  gap: 8px;
  padding: clamp(16px, 2vw, 24px);
  border: 1px solid rgba(217, 239, 87, 0.34);
  border-radius: 8px;
  background: rgba(8, 10, 8, 0.32);
  color: #f2f4cf;
}

.project-notes span {
  color: #d9ef57;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.project-notes strong {
  font-size: clamp(18px, 1.6vw, 24px);
}

.project-notes p {
  margin: 0;
  font-size: clamp(12px, 0.9vw, 15px);
  line-height: 1.45;
}

.notebook-arrow {
  position: absolute;
  top: 50%;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(217, 239, 87, 0.46);
  border-radius: 50%;
  background: rgba(8, 10, 8, 0.38);
  color: #f6f6d8;
  font: 700 22px/1 "Consolas", monospace;
  transform: translateY(-50%);
}

.notebook-arrow:hover,
.notebook-arrow:focus-visible {
  background: rgba(8, 10, 8, 0.66);
  outline: none;
}

.notebook-arrow-prev {
  left: 8px;
}

.notebook-arrow-next {
  right: 8px;
}

.notebook-count {
  position: absolute;
  right: clamp(18px, 2vw, 34px);
  bottom: 12px;
  color: rgba(246, 246, 216, 0.72);
  font-size: 12px;
  font-weight: 700;
}

.project-back {
  position: absolute;
  left: 24px;
  bottom: 22px;
  border-color: var(--gold);
  background: rgba(5, 7, 9, 0.76);
}

.skills-notebook-view {
  align-items: stretch;
  padding: 0;
}

.skills-notebook-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.54), transparent 48%, rgba(0, 0, 0, 0.5)),
    radial-gradient(circle at 52% 52%, rgba(164, 209, 31, 0.13), transparent 26rem);
}

.skills-notebook {
  position: absolute;
  left: 37%;
  top: 12%;
  width: min(430px, 30vw);
  min-height: 54%;
  display: grid;
  align-content: start;
  gap: clamp(10px, 1.4vh, 16px);
  padding: clamp(22px, 2.2vw, 34px) clamp(44px, 3.6vw, 62px) clamp(42px, 3vw, 56px);
  border: 1px solid rgba(164, 209, 31, 0.54);
  border-radius: 8px;
  background: rgba(5, 8, 5, 0.56);
  color: #f3f6d6;
  font-family: "Consolas", "Lucida Console", "Courier New", monospace;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.74);
  box-shadow:
    inset 0 0 22px rgba(164, 209, 31, 0.08),
    0 12px 32px rgba(0, 0, 0, 0.36);
}

.skills-notebook h1 {
  margin: 0;
  color: #f6f6d8;
  font-size: clamp(24px, 2.3vw, 40px);
  line-height: 1;
}

.skills-summary {
  margin: 0;
  color: #eef0d4;
  font-size: clamp(12px, 0.95vw, 15px);
  line-height: 1.45;
}

.skills-page-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.skills-page-list li {
  position: relative;
  padding-left: 19px;
  color: #f8f4db;
  font-size: clamp(12px, 0.92vw, 15px);
  line-height: 1.3;
}

.skills-page-list li::before {
  content: ">";
  position: absolute;
  left: 0;
  color: #a4d11f;
}

.terminal {
  position: relative;
  min-height: 100vh;
  background: var(--terminal-bg);
  color: var(--terminal-text);
  padding: 18px;
  font-family: "Consolas", "Lucida Console", "Courier New", monospace;
  font-size: 15px;
  line-height: 1.28;
  outline: none;
}

.terminal-screen {
  padding: 0;
  overflow: hidden;
  background: #020202;
}

.terminal-bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  user-select: none;
}

.terminal-output {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  white-space: pre-wrap;
  word-break: break-word;
}

.terminal-screen .terminal-output {
  position: absolute;
  left: 4.2vw;
  right: 4.2vw;
  top: 5vh;
  bottom: 28vh;
  max-width: none;
  overflow: auto;
  padding: 16px 18px;
  color: rgba(202, 255, 164, 0.94);
  text-shadow: 0 0 8px rgba(80, 255, 82, 0.28);
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 255, 42, 0.38) transparent;
}

.terminal-line {
  min-height: 19px;
}

.terminal-line + .terminal-line {
  margin-top: 1px;
}

.prompt {
  color: var(--terminal-green);
  font-weight: 700;
}

.cmd-text {
  color: var(--terminal-text);
}

.term-link {
  color: var(--terminal-cyan);
  text-decoration: none;
}

.term-link:hover {
  text-decoration: underline;
}

.muted {
  color: #b8b8b8;
}

.ok {
  color: var(--terminal-green);
}

.error {
  color: var(--terminal-red);
}

.cyan {
  color: var(--terminal-cyan);
}

.dir-name {
  color: var(--terminal-cyan);
  font-weight: 700;
}

.file-name {
  color: var(--terminal-text);
}

.suggestion {
  color: var(--terminal-cyan);
}

.input-row {
  display: flex;
  align-items: baseline;
  max-width: 100%;
}

.terminal-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.visible-input {
  min-width: 1ch;
  white-space: pre;
}

.cursor {
  display: inline-block;
  width: 9px;
  height: 1.05em;
  margin-left: 1px;
  background: var(--terminal-green);
  vertical-align: -2px;
  animation: blink 1.05s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.gui {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(0, 168, 255, 0.18), transparent 24rem),
    linear-gradient(135deg, #101320 0%, #18152d 48%, #101621 100%);
  color: var(--ink);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  padding: 14px clamp(18px, 4vw, 52px);
  background: rgba(9, 11, 18, 0.86);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
}

.brand {
  display: grid;
  gap: 2px;
}

.brand strong {
  font-size: 18px;
}

.brand span {
  color: var(--muted);
  font-size: 13px;
}

.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.view-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, 1fr);
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.view-tab,
.button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  color: var(--ink);
  background: transparent;
  padding: 0 14px;
}

.view-tab.active {
  background: var(--panel-strong);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  text-decoration: none;
}

.button.primary {
  border-color: transparent;
  background: var(--blue);
  color: #fff;
}

.button.magenta {
  border-color: transparent;
  background: var(--pink);
  color: #fff;
}

.gui-selector {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 36px 18px;
  text-align: center;
}

.selector-inner {
  display: grid;
  gap: 26px;
  width: min(580px, 100%);
}

.selector-inner h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 48px);
  letter-spacing: 0;
}

.selector-inner p {
  margin: 0;
  color: var(--muted);
}

.selector-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.selector-actions .button {
  min-height: 74px;
  font-size: 17px;
}

.page {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 56px 0 72px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 34px;
  align-items: center;
  padding: 28px 0 42px;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero p {
  margin: 0;
  max-width: 66ch;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.status-panel {
  display: grid;
  gap: 16px;
  padding: 22px;
  background: rgba(23, 26, 37, 0.85);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.status-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.status-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.status-row span {
  color: var(--muted);
}

.status-row strong {
  text-align: right;
}

.section {
  margin-top: 46px;
}

.section h2 {
  margin: 0 0 18px;
  font-size: 26px;
  letter-spacing: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card {
  min-height: 164px;
  padding: 20px;
  background: rgba(23, 26, 37, 0.9);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.card h3 {
  margin: 0 0 10px;
  font-size: 19px;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 8px;
  color: var(--muted);
  font-size: 13px;
}

.creative-stage {
  min-height: 360px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(0, 194, 168, 0.12) 1px, transparent 1px),
    linear-gradient(rgba(240, 180, 41, 0.12) 1px, transparent 1px),
    #10131d;
  background-size: 42px 42px;
  overflow: hidden;
}

.creative-mark {
  width: min(280px, 70vw);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: grid;
  place-items: center;
  position: relative;
  animation: breathe 5s ease-in-out infinite;
}

.creative-mark::before,
.creative-mark::after {
  content: "";
  position: absolute;
  inset: 18%;
  border: 2px solid rgba(0, 216, 255, 0.65);
  transform: rotate(35deg);
}

.creative-mark::after {
  inset: 32%;
  border-color: rgba(244, 0, 216, 0.65);
  transform: rotate(-22deg);
}

.creative-mark span {
  z-index: 1;
  font: 700 48px/1 "Consolas", monospace;
}

@keyframes breathe {
  50% {
    transform: scale(1.04);
  }
}

@media (max-width: 780px) {
  .scene {
    overflow: hidden;
  }

  .desk-scene {
    min-height: 100svh;
    height: 100svh;
  }

  .scene-bg {
    object-position: center;
  }

  .scene-title {
    left: 5vw;
    top: 2.7svh;
    right: 5vw;
  }

  .scene-title h1 {
    font-size: clamp(28px, 8.2vw, 42px);
    margin-bottom: 8px;
  }

  .scene-title p {
    font-size: clamp(10px, 2.7vw, 14px);
  }

  .terminal-card {
    left: 5vw;
    right: 5vw;
    top: 11.2svh;
    width: auto;
    min-height: 96px;
    padding: 14px 16px;
    background: rgba(4, 8, 7, 0.72);
  }

  .terminal-card p {
    margin-bottom: 8px;
    font-size: clamp(15px, 4.6vw, 21px);
    line-height: 1.3;
  }

  .desktop-copy {
    display: none;
  }

  .mobile-copy {
    display: block;
  }

  .scene-hotspot {
    display: none;
  }

  .scene-hud {
    display: none;
  }

  .mobile-action-grid {
    position: absolute;
    left: 4.4vw;
    right: 4.4vw;
    bottom: 15.4svh;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .mobile-laptop-hotspot {
    position: absolute;
    left: 4vw;
    top: 31svh;
    z-index: 3;
    display: block;
    width: 44vw;
    height: 16svh;
    border: 0;
    padding: 0;
    background: transparent;
  }

  .mobile-laptop-hotspot:focus-visible {
    outline: 2px solid var(--terminal-green);
    outline-offset: 4px;
  }

  .mobile-action-card {
    --mobile-accent: var(--terminal-green);
    min-width: 0;
    min-height: clamp(60px, 8.2svh, 78px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 18px;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--mobile-accent);
    border-radius: 8px;
    padding: 8px 10px;
    background: rgba(4, 8, 7, 0.78);
    color: #f8f4db;
    font-family: "Consolas", "Lucida Console", "Courier New", monospace;
    text-align: left;
    box-shadow:
      inset 0 0 18px color-mix(in srgb, var(--mobile-accent) 10%, transparent),
      0 0 18px rgba(0, 0, 0, 0.36);
  }

  .mobile-action-card:focus-visible {
    outline: 2px solid var(--mobile-accent);
    outline-offset: 3px;
  }

  .mobile-action-card span {
    min-width: 0;
    display: grid;
    gap: 3px;
  }

  .mobile-action-card strong {
    color: var(--mobile-accent);
    font-size: clamp(13px, 3.5vw, 17px);
    line-height: 1;
    overflow-wrap: anywhere;
  }

  .mobile-action-card em {
    color: #f8f4db;
    font-size: clamp(10px, 2.85vw, 13px);
    font-style: normal;
    line-height: 1.15;
  }

  .mobile-action-card b {
    color: var(--mobile-accent);
    font-size: 26px;
    line-height: 1;
  }

  .mobile-action-cyan {
    --mobile-accent: var(--terminal-cyan);
  }

  .mobile-action-purple {
    --mobile-accent: #a970ff;
  }

  .mobile-action-gold {
    --mobile-accent: var(--gold);
  }

  .mobile-status {
    position: absolute;
    left: 4.4vw;
    right: 4.4vw;
    bottom: 2.2svh;
    display: grid;
    gap: 9px;
    min-height: 11.3svh;
    border: 1px solid #91f05e;
    border-radius: 8px;
    padding: 10px 12px;
    background: rgba(4, 8, 7, 0.78);
    color: #a5ff69;
    font-family: "Consolas", "Lucida Console", "Courier New", monospace;
    box-shadow: 0 0 20px rgba(145, 240, 94, 0.12);
  }

  .mobile-status > strong {
    font-size: clamp(12px, 3.2vw, 16px);
  }

  .mobile-status div {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .mobile-status span {
    min-width: 0;
    display: grid;
    gap: 3px;
    justify-items: center;
    border-right: 1px solid rgba(145, 240, 94, 0.32);
    padding: 0 4px;
    text-align: center;
    font-size: clamp(9px, 2.35vw, 12px);
    line-height: 1.2;
  }

  .mobile-status span:last-child {
    border-right: 0;
  }

  .mobile-status b {
    color: #f8f4db;
    font-size: clamp(10px, 2.8vw, 13px);
  }

  .terminal {
    padding: 13px;
    font-size: 13px;
  }

  .terminal-screen .terminal-output {
    left: 7vw;
    right: 8vw;
    top: 20.5svh;
    bottom: 52svh;
    padding: 8px 11px;
    overflow: auto;
    font-size: clamp(11px, 2.8vw, 14px);
    line-height: 1.28;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 255, 42, 0.36) transparent;
  }

  .terminal-screen .terminal-output::-webkit-scrollbar {
    width: 4px;
  }

  .terminal-screen .terminal-output::-webkit-scrollbar-track {
    background: transparent;
  }

  .terminal-screen .terminal-output::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(0, 255, 42, 0.42);
  }

  .mobile-terminal-return {
    position: absolute;
    z-index: 2;
    top: 14.4svh;
    left: 7vw;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 13px;
    border: 1px solid var(--terminal-green);
    border-radius: 8px;
    background: rgba(4, 8, 7, 0.78);
    color: #a5ff69;
    font-family: "Consolas", "Lucida Console", "Courier New", monospace;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    box-shadow:
      inset 0 0 14px rgba(106, 255, 0, 0.12),
      0 0 18px rgba(0, 0, 0, 0.35);
  }

  .mobile-terminal-return:focus-visible {
    outline: 2px solid var(--terminal-green);
    outline-offset: 3px;
  }

  .mobile-terminal-input {
    position: static;
    width: min(42vw, 22ch);
    height: auto;
    border: 0;
    border-radius: 0;
    padding: 0;
    opacity: 1;
    pointer-events: auto;
    background: transparent;
    color: var(--terminal-text);
    caret-color: var(--terminal-green);
    direction: ltr;
    text-align: left;
    outline: none;
  }

  .terminal-bg-image,
  .focus-bg {
    object-position: center;
  }

  .gallery {
    overflow: auto;
  }

  .gallery-view,
  .gallery-stage,
  .gallery-topbar {
    display: grid;
  }

  .gallery-stage {
    grid-template-columns: 1fr;
  }

  .gallery-media {
    max-height: 46vh;
  }

  .project-notebook-view {
    overflow: hidden;
    padding: 0;
  }

  .project-notebook {
    position: absolute;
    left: 6vw;
    right: 6vw;
    top: 10svh;
    width: auto;
    height: 78svh;
    min-height: 0;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, auto) minmax(0, 1fr);
    align-content: stretch;
    gap: 14px;
    overflow: hidden;
    padding: 54px 22px 50px;
    background: rgba(6, 8, 6, 0.56);
    border: 1px solid rgba(217, 239, 87, 0.46);
    border-radius: 8px;
    backdrop-filter: blur(2px);
  }

  .project-copy {
    gap: 8px;
    overflow: auto;
  }

  .project-copy h1 {
    font-size: clamp(25px, 7vw, 34px);
  }

  .project-copy p {
    font-size: clamp(12px, 3.25vw, 15px);
    line-height: 1.35;
  }

  .project-tags {
    gap: 5px;
  }

  .project-tags span {
    font-size: 10px;
  }

  .project-demo-shell {
    width: min(210px, 52vw);
    max-height: 34svh;
    margin-top: 4px;
  }

  .project-notes {
    width: 100%;
  }

  .skills-notebook-view {
    overflow: hidden;
    padding: 0;
  }

  .skills-notebook {
    position: absolute;
    left: 6vw;
    right: 6vw;
    top: 11svh;
    width: auto;
    min-height: 0;
    height: 76svh;
    padding: 54px 48px 50px;
    background: rgba(6, 8, 6, 0.58);
    border: 1px solid rgba(164, 209, 31, 0.5);
    border-radius: 8px;
    backdrop-filter: blur(2px);
    overflow: hidden;
  }

  .skills-notebook h1 {
    font-size: clamp(24px, 7vw, 34px);
  }

  .skills-summary {
    font-size: clamp(12px, 3.35vw, 15px);
    line-height: 1.38;
  }

  .skills-page-list {
    gap: 7px;
    overflow: auto;
  }

  .skills-page-list li {
    font-size: clamp(12px, 3.25vw, 15px);
  }

  .notebook-arrow-prev {
    left: 12px;
  }

  .notebook-arrow-next {
    right: 12px;
  }

  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .actions {
    width: 100%;
    justify-content: flex-start;
  }

  .view-tabs {
    width: 100%;
  }

  .hero,
  .grid,
  .selector-actions {
    grid-template-columns: 1fr;
  }

  .page {
    width: min(100% - 28px, 1120px);
    padding-top: 30px;
  }
}
