/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #0b1033;
  background: radial-gradient(ellipse at 50% 0%, #121c4a 0%, #080c26 50%, #040712 100%);
  color: #fff;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ── Full-Screen Background Canvas (fixed) ─────────────── */
#game-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 0;
  pointer-events: none; /* don't block scrolling */
}

/* ── Scrollable Content Overlay ────────────────────────── */
#content {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

/* ── Section Base ──────────────────────────────────────── */
.section {
  min-height: 100vh;
  padding: 100px 24px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ── Hero Section ──────────────────────────────────────── */
.hero-section {
  min-height: 100vh;
  justify-content: center;
}

#hero {
  text-align: center;
  margin-bottom: 2rem;
}

#name {
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #7ec8e3;
  text-shadow:
    0 0 30px rgba(126, 200, 227, 0.4),
    0 0 60px rgba(126, 200, 227, 0.15),
    0 4px 12px rgba(0,0,0,0.3);
  user-select: none;
}

#tagline {
  font-size: clamp(0.9rem, 2.5vw, 1.3rem);
  letter-spacing: 0.15em;
  color: rgba(126, 200, 227, 0.7);
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
  margin-top: 0.5rem;
  text-transform: uppercase;
  user-select: none;
}

/* ── Navigation Links ──────────────────────────────────── */
#nav-links {
  display: flex;
  gap: 2rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-link {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 1rem;
  letter-spacing: 0.08em;
  font-weight: 600;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 4px;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 100%;
  height: 2px;
  background: #fff;
  transition: transform 0.2s ease;
}

.nav-link:hover {
  color: #fff;
}

.nav-link:hover::after {
  transform: translateX(-50%) scaleX(1);
}

/* ── Hint & Scroll Indicator ───────────────────────────── */
#hint {
  color: rgba(255,255,255,0.35);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  user-select: none;
  margin-bottom: 1rem;
}

#hint kbd {
  background: rgba(255,255,255,0.1);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
}

.scroll-indicator {
  color: rgba(255,255,255,0.3);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  animation: bounce 2s infinite;
  user-select: none;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* ── Section Titles ────────────────────────────────────── */
.section-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 3rem;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}

.section-placeholder {
  color: rgba(255,255,255,0.4);
  font-size: 1.1rem;
  letter-spacing: 0.05em;
}

/* ---- LIVE badge ---- */
.section-title-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
}
.section-title-row .section-title { margin-bottom: 0; }
.live-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #0b1033;
  background: #ff5f56;
  box-shadow: 0 0 16px rgba(255, 95, 86, 0.45);
  animation: live-pulse 2s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { box-shadow: 0 0 12px rgba(255, 95, 86, 0.35); }
  50%      { box-shadow: 0 0 26px rgba(255, 95, 86, 0.75); }
}
.debug-caption {
  max-width: 640px;
  text-align: center;
  color: rgba(255,255,255,0.55);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  line-height: 1.6;
  margin: -1.5rem 0 1.5rem;
}
.debug-attribution {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.04em;
}
.debug-attribution a {
  color: rgba(126,200,227,0.85);
  text-decoration: none;
  border-bottom: 1px dotted rgba(126,200,227,0.4);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.debug-attribution a:hover {
  color: #7ec8e3;
  border-color: #7ec8e3;
}
.tl.live { color: #ff5f56; font-weight: 600; }
.tl.hash { color: #9be29b; }
.tl.meta { color: rgba(212,224,232,0.5); font-size: 0.85rem; }
.tl.msg { color: #d4e0e8; }
.tl.stat { color: #ffd479; }

/* ── Track List (Music Section) — SoundCloud-style ─────── */
.track-list {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sc-track {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  background: rgba(17, 21, 39, 0.85);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 0.8rem 1rem 0.9rem;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.sc-track:hover {
  background: rgba(30, 35, 60, 0.95);
  border-color: rgba(255,255,255,0.16);
}

.sc-track.playing {
  border-color: rgba(255,85,0,0.55);
  box-shadow: 0 0 22px rgba(255,85,0,0.12);
}

/* SoundCloud orange circular play/pause button */
.sc-play {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  margin-top: 2px;
  border: none;
  border-radius: 50%;
  background: #ff5500;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
  box-shadow: 0 2px 10px rgba(255,85,0,0.35);
}

.sc-play:hover {
  background: #ff6b1f;
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(255,85,0,0.5);
}

.sc-play:active {
  transform: scale(0.95);
}

.sc-play svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  display: block;
  pointer-events: none;
}

.sc-play .sc-ico-pause { display: none; }

.sc-track.playing .sc-play .sc-ico-play  { display: none; }
.sc-track.playing .sc-play .sc-ico-pause { display: block; }

.sc-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding-top: 2px;
}

.sc-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.sc-title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.sc-track.playing .sc-title {
  color: #ff7a2f;
}

.sc-time {
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-family: "SF Mono", "Menlo", monospace;
  letter-spacing: 0.03em;
  color: rgba(255,255,255,0.45);
}

/* Right column inside .sc-top: elapsed time + play count, stacked. */
.sc-side {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
}

.sc-plays {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.38);
  white-space: nowrap;
}

.sc-plays-num {
  font-family: "SF Mono", "Menlo", monospace;
  color: rgba(255,255,255,0.6);
}

.sc-wave {
  position: relative;
  width: 100%;
  height: 56px;
  border-radius: 8px;
  cursor: pointer;
  background: rgba(255,255,255,0.02);
  overflow: hidden;
}

.sc-wave-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.sc-track.has-error .sc-wave {
  opacity: 0.5;
}

/* ── Debug Section & Terminal ─────────────────────────── */
.debug-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  max-width: 720px;
  margin-bottom: 1.5rem;
}

.debug-controls label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}

.debug-controls select {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: #fff;
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
  outline: none;
  cursor: pointer;
  min-width: 160px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.debug-controls select:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.25);
}

.debug-controls select:focus {
  border-color: #7ec8e3;
}

.debug-controls select option {
  background: #0b1033;
  color: #fff;
}

.debug-controls button {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0.5rem 1.1rem;
  cursor: pointer;
  align-self: flex-end;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

.debug-controls button:hover {
  background: rgba(126,200,227,0.15);
  border-color: #7ec8e3;
}

.debug-controls button:active {
  transform: scale(0.97);
}

/* ── Terminal ─────────────────────────────────────────── */
.terminal {
  width: 100%;
  max-width: 760px;
  background: rgba(2, 6, 16, 0.92);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.45);
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.terminal-bar .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.terminal-bar .red    { background: #ff5f56; }
.terminal-bar .yellow { background: #ffbd2e; }
.terminal-bar .green  { background: #27c93f; }

.terminal-title {
  margin-left: 0.5rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.05em;
}

.terminal-output {
  height: 400px;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  font-family: "SF Mono", "Menlo", "Monaco", "Consolas", "Liberation Mono", monospace;
  font-size: 0.85rem;
  line-height: 1.55;
  color: #d4e0e8;
  scroll-behavior: smooth;
}

/* terminal lines */
.tl { white-space: pre-wrap; word-break: break-word; margin: 0; }

.tl.cmd  { color: #7ec8e3; }
.tl.info { color: #ffd479; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.8rem; }
.tl.dim  { color: rgba(212,224,232,0.45); }
.tl.sel  { color: #9be29b; font-weight: 600; }

.tl.choice {
  color: rgba(212,224,232,0.85);
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.1s ease, color 0.1s ease;
}

.tl.choice:hover {
  background: rgba(126,200,227,0.12);
  color: #7ec8e3;
}

.tl.prompt { color: #9be29b; }

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

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

.terminal-output::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 5px;
}

.terminal-output::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.25);
}

/* ── Blog Section ──────────────────────────────────────── */
.blog-caption {
  max-width: 640px;
  text-align: center;
  color: rgba(255,255,255,0.55);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  line-height: 1.6;
  margin: -1.5rem 0 2rem;
}

.blog-grid {
  width: 100%;
  max-width: 860px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.blog-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.blog-card:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.18);
  transform: translateY(-3px);
}

.blog-card-cover {
  height: 170px;
  overflow: hidden;
  background: rgba(2,6,16,0.55);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.blog-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.blog-card:hover .blog-card-cover img {
  transform: scale(1.05);
}

.blog-card-cover-text {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  color: rgba(126,200,227,0.5);
  text-shadow: 0 0 20px rgba(126,200,227,0.3);
}

.blog-card-body {
  padding: 1.1rem 1.25rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.blog-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7ec8e3;
  background: rgba(126,200,227,0.12);
  border: 1px solid rgba(126,200,227,0.3);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  align-self: flex-start;
}

.blog-date {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.4);
}

.blog-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.4;
}

.blog-media-badge {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  margin-top: auto;
}

/* Read counter on blog cards + post detail. */
.blog-card-stats {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.blog-reads {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.42);
}

.blog-reads-num {
  font-family: "SF Mono", "Menlo", monospace;
  color: rgba(255,255,255,0.65);
}

.blog-post-header .blog-reads {
  color: rgba(255,255,255,0.5);
}

/* ── Blog Post Detail ─────────────────────────────────── */
.blog-detail {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(3,6,18,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.blog-detail[hidden] { display: none; }

.blog-detail-inner {
  width: 100%;
  max-width: 760px;
  background: rgba(6,10,30,0.95);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 2.2rem 2.4rem 2.6rem;
  position: relative;
  box-shadow: 0 12px 60px rgba(0,0,0,0.6);
  animation: panelIn 0.25s ease;
  margin: auto 0;
}

.blog-detail-close {
  position: absolute;
  top: 0.7rem;
  right: 1rem;
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease;
}

.blog-detail-close:hover { color: #fff; }

.blog-post-header {
  margin-bottom: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.blog-post-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.3;
}

.blog-post-header .blog-date { font-size: 0.82rem; }

.blog-text {
  font-size: 1rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.75);
}

.blog-text p { margin: 0 0 1.1rem; }
.blog-text p:last-child { margin-bottom: 0; }

.blog-figure {
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.blog-img,
.blog-video {
  width: 100%;
  border-radius: 12px;
  display: block;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}

.blog-figcaption {
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.4);
  text-align: center;
}

/* Blog mobile tweaks */
@media (max-width: 600px) {
  .blog-detail { padding: 0.8rem; }
  .blog-detail-inner { padding: 1.5rem 1.2rem 1.8rem; }
}

/* ── Apps Section ──────────────────────────────────────── */
.apps-caption {
  max-width: 640px;
  text-align: center;
  color: rgba(255,255,255,0.55);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  line-height: 1.6;
  margin: -1.5rem 0 2rem;
}

#apps-gallery {
  width: 100%;
  max-width: 860px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.app-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.app-card:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.18);
  transform: translateY(-3px);
}

.app-thumb {
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(126,200,227,0.14), transparent 70%),
    rgba(2,6,16,0.55);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.thumb-widget {
  width: 150px;
  height: 110px;
  border-radius: 12px;
  background: rgba(10,16,40,0.9);
  border: 1px solid rgba(126,200,227,0.25);
  box-shadow: 0 4px 24px rgba(0,0,0,0.5), inset 0 0 24px rgba(126,200,227,0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem;
  font-family: "SF Mono", "Menlo", monospace;
}

.thumb-clock-time {
  font-size: 1.5rem;
  font-weight: 700;
  color: #7ec8e3;
  letter-spacing: 0.03em;
  text-shadow: 0 0 14px rgba(126,200,227,0.5);
}

.thumb-clock-tz {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}

.thumb-fx-pair {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: #ffd479;
  text-transform: uppercase;
}

.thumb-fx-price {
  font-size: 1.05rem;
  font-weight: 600;
  color: #9be29b;
  letter-spacing: 0.02em;
}

.thumb-cal {
  gap: 0.3rem;
  padding: 0.6rem;
}

.thumb-cal-month {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}

.thumb-cal-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.3rem;
}

.thumb-cal-grid span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.thumb-cal-grid .dot-green {
  background: #4caf7d;
  box-shadow: 0 0 6px rgba(76,175,125,0.5);
  color: transparent;
}

.thumb-cal-grid .dot-red {
  background: #ff5f56;
  box-shadow: 0 0 6px rgba(255,95,86,0.5);
  color: transparent;
}

.app-body {
  padding: 1.1rem 1.25rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}

.app-title {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.app-desc {
  font-size: 0.88rem;
  line-height: 1.55;
  color: rgba(255,255,255,0.6);
  flex: 1;
}

.app-open {
  align-self: flex-start;
  background: rgba(126,200,227,0.12);
  border: 1px solid rgba(126,200,227,0.45);
  color: #7ec8e3;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.55rem 1.3rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

.app-open:hover {
  background: rgba(126,200,227,0.22);
  box-shadow: 0 0 18px rgba(126,200,227,0.25);
}

.app-open:active {
  transform: scale(0.96);
}

/* App detail panel */
#app-detail {
  width: 100%;
  max-width: 760px;
  background: rgba(6,10,30,0.85);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 1.6rem 1.8rem 2rem;
  position: relative;
  box-shadow: 0 8px 48px rgba(0,0,0,0.5);
  animation: panelIn 0.25s ease;
}

@keyframes panelIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.app-close {
  position: absolute;
  top: 0.7rem;
  right: 0.9rem;
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease;
}

.app-close:hover { color: #fff; }

.app-panel-title {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 1.4rem;
}

/* FX Holiday Calendar */
.cal-caption {
  font-size: 0.85rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.55);
  margin: -0.8rem 0 1.2rem;
}

.cal-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.cal-nav {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
  color: #fff;
  font-size: 1.2rem;
  line-height: 1;
  width: 38px;
  height: 38px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

.cal-nav:hover { background: rgba(126,200,227,0.15); border-color: rgba(126,200,227,0.5); }
.cal-nav:active { transform: scale(0.94); }

.cal-month-label {
  min-width: 170px;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.cal-today-btn {
  background: rgba(126,200,227,0.12);
  border: 1px solid rgba(126,200,227,0.45);
  color: #7ec8e3;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.cal-today-btn:hover {
  background: rgba(126,200,227,0.22);
  box-shadow: 0 0 14px rgba(126,200,227,0.25);
}

.cal-week-head {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  margin-bottom: 5px;
}

.cal-week-head span {
  text-align: center;
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  padding: 0.35rem 0;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.cal-cell {
  aspect-ratio: 1;
  border: none;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: "SF Mono", "Menlo", monospace;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.15s ease, background 0.2s ease;
  color: rgba(255,255,255,0.75);
}

.cal-cell:active { transform: scale(0.94); }

.cal-blank {
  cursor: default;
  background: transparent;
  border-radius: 0;
}

.cal-open {
  background: rgba(76,175,125,0.14);
  border: 1px solid rgba(76,175,125,0.35);
  color: #9be29b;
}

.cal-open:hover {
  background: rgba(76,175,125,0.22);
  box-shadow: 0 0 12px rgba(76,175,125,0.25);
}

.cal-holiday {
  background: rgba(255,95,86,0.16);
  border: 1px solid rgba(255,95,86,0.45);
  color: #ff8a7d;
}

.cal-holiday:hover {
  background: rgba(255,95,86,0.26);
  box-shadow: 0 0 12px rgba(255,95,86,0.3);
}

.cal-cell.selected {
  outline: 2px solid #7ec8e3;
  outline-offset: 1px;
  box-shadow: 0 0 14px rgba(126,200,227,0.35);
}

.cal-today {
  position: relative;
}

.cal-today::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #7ec8e3;
  box-shadow: 0 0 6px rgba(126,200,227,0.8);
}

.cal-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2rem;
  margin-top: 1.1rem;
  font-size: 0.76rem;
  color: rgba(255,255,255,0.5);
}

.cal-leg {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.leg-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.leg-green { background: #4caf7d; box-shadow: 0 0 6px rgba(76,175,125,0.5); }
.leg-red   { background: #ff5f56; box-shadow: 0 0 6px rgba(255,95,86,0.5); }

.cal-detail {
  margin-top: 1.2rem;
  background: rgba(255,95,86,0.08);
  border: 1px solid rgba(255,95,86,0.3);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  animation: panelIn 0.2s ease;
}

.cal-detail-date {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ff8a7d;
  margin-bottom: 0.6rem;
}

.cal-detail-currencies {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cal-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,95,86,0.12);
  border: 1px solid rgba(255,95,86,0.35);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.85);
}

.cal-chip strong {
  color: #ff8a7d;
  font-family: "SF Mono", "Menlo", monospace;
  font-size: 0.9rem;
}

/* FX */
.fx-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.fx-controls label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}

.fx-controls select {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
  color: #fff;
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
  outline: none;
  cursor: pointer;
  min-width: 220px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.fx-controls select:hover { background: rgba(255,255,255,0.08); border-color: rgba(126,200,227,0.5); }
.fx-controls select:focus { border-color: #7ec8e3; }
.fx-controls select option { background: #0b1033; color: #fff; }

.fx-status {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  white-space: nowrap;
}

.fx-status.live    { color: #9be29b; background: rgba(155,226,155,0.1); box-shadow: 0 0 12px rgba(155,226,155,0.25); }
.fx-status.loading { color: #ffd479; background: rgba(255,212,121,0.1); }
.fx-status.offline { color: #ff5f56; background: rgba(255,95,86,0.1); }

.fx-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
}

.fx-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.fx-table th {
  text-align: left;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}

.fx-table td {
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.fx-table tr:last-child td { border-bottom: none; }

.fx-pair { font-weight: 600; color: #d4e0e8; }
.fx-num  { font-family: "SF Mono", "Menlo", monospace; color: rgba(255,255,255,0.85); }
.fx-trend { font-family: "SF Mono", "Menlo", monospace; font-weight: 700; }
.fx-trend.up   { color: #9be29b; }
.fx-trend.down { color: #ff5f56; }
.fx-trend.flat { color: rgba(255,255,255,0.35); }

.fx-note {
  margin-top: 1rem;
  font-size: 0.8rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.4);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.fx-note p { margin: 0; }

.fx-note a {
  color: rgba(126,200,227,0.85);
  text-decoration: none;
  border-bottom: 1px dotted rgba(126,200,227,0.4);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.fx-note a:hover {
  color: #7ec8e3;
  border-color: #7ec8e3;
}

/* ── Responsive: Mobile ────────────────────────────────── */
@media (max-width: 600px) {
  .section {
    padding: 80px 16px 60px;
  }

  #nav-links {
    gap: 1rem;
  }

  .nav-link {
    font-size: 0.85rem;
  }

  #hint {
    font-size: 0.75rem;
  }

  .sc-track {
    padding: 0.7rem 0.8rem 0.8rem;
    gap: 0.7rem;
  }

  .sc-play {
    width: 42px;
    height: 42px;
  }

  .sc-play svg {
    width: 19px;
    height: 19px;
  }

  .sc-title {
    font-size: 0.92rem;
  }

  .sc-time {
    font-size: 0.72rem;
  }

  .sc-wave {
    height: 48px;
  }

  .debug-controls {
    gap: 0.75rem;
  }

  .debug-controls select {
    min-width: 130px;
    font-size: 0.85rem;
  }

  .terminal-output {
    height: 320px;
    font-size: 0.78rem;
    padding: 0.8rem 0.9rem;
  }

  /* Apps mobile */
  #apps-gallery {
    grid-template-columns: 1fr;
  }

  .app-thumb {
    height: 140px;
  }

  #app-detail {
    padding: 1.2rem 1.1rem 1.5rem;
  }

  .cal-toolbar {
    gap: 0.5rem;
  }

  .cal-month-label {
    min-width: 130px;
    font-size: 0.92rem;
  }

  .cal-nav {
    width: 34px;
    height: 34px;
  }

  .cal-today-btn {
    font-size: 0.66rem;
    padding: 0.4rem 0.7rem;
  }

  .cal-grid {
    gap: 3px;
  }

  .cal-week-head {
    gap: 3px;
  }

  .cal-cell {
    border-radius: 7px;
    font-size: 0.76rem;
  }

  .cal-legend {
    gap: 0.7rem;
    font-size: 0.7rem;
  }

  .cal-chip {
    font-size: 0.76rem;
    padding: 0.3rem 0.65rem;
  }

  .fx-controls {
    flex-direction: column;
    align-items: flex-start;
  }

  .fx-controls select {
    min-width: 100%;
  }

  .fx-table {
    font-size: 0.82rem;
  }

  .fx-table th,
  .fx-table td {
    padding: 0.55rem 0.65rem;
  }

}

/* ── Share buttons ──────────────────────────────────────────────────── */
/* Small ghost icon button on each music track row. */
.sc-share {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.sc-share:hover {
  background: rgba(126, 200, 227, 0.16);
  border-color: rgba(126, 200, 227, 0.45);
  color: #7ec8e3;
}

/* Small share icon inside each blog card (does not open the post). */
.card-share {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  margin-left: auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.card-share:hover {
  background: rgba(126, 200, 227, 0.16);
  border-color: rgba(126, 200, 227, 0.45);
  color: #7ec8e3;
}

/* Share button in the blog detail header. */
.blog-share-btn {
  align-self: flex-start;
  border: 1px solid rgba(126, 200, 227, 0.4);
  border-radius: 999px;
  background: rgba(126, 200, 227, 0.1);
  color: #7ec8e3;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease;
}

.blog-share-btn:hover {
  background: rgba(126, 200, 227, 0.22);
  color: #9fdcf2;
}

.blog-share-btn:active {
  transform: scale(0.96);
}

/* ── Share modal ────────────────────────────────────────────────────── */
.share-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(3, 6, 18, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.share-modal[hidden] {
  display: none;
}

.share-modal-inner {
  width: 100%;
  max-width: 460px;
  background: rgba(6, 10, 30, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 2rem 1.8rem 1.8rem;
  position: relative;
  box-shadow: 0 12px 60px rgba(0, 0, 0, 0.6);
  animation: sharePanelIn 0.25s ease;
}

@keyframes sharePanelIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.share-modal-close {
  position: absolute;
  top: 0.55rem;
  right: 0.9rem;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease;
}

.share-modal-close:hover {
  color: #fff;
}

.share-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.share-subtitle {
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 0.3rem;
  margin-bottom: 1.3rem;
}

.share-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
}

.share-qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.share-qr {
  width: 220px;
  height: 220px;
  border-radius: 12px;
  background: #fff;
  padding: 6px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}

.share-qr-hint {
  font-size: 0.74rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  max-width: 250px;
}

.share-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.share-row {
  display: flex;
  gap: 0.5rem;
}

.share-input {
  flex: 1;
  min-width: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.78rem;
  font-family: "SF Mono", "Menlo", monospace;
  padding: 0.55rem 0.7rem;
  outline: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-input:focus {
  border-color: rgba(126, 200, 227, 0.5);
}

.share-btn {
  flex: 0 0 auto;
  border: 1px solid rgba(126, 200, 227, 0.4);
  border-radius: 9px;
  background: rgba(126, 200, 227, 0.1);
  color: #7ec8e3;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}

.share-btn:hover {
  background: rgba(126, 200, 227, 0.22);
  color: #9fdcf2;
}

.share-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.share-btn-row {
  display: flex;
  gap: 0.5rem;
}

.share-btn-row .share-btn {
  flex: 1;
}

.share-status {
  min-height: 1.1em;
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
}

@media (max-width: 480px) {
  .share-modal-inner {
    padding: 1.7rem 1.2rem 1.4rem;
  }

  .share-qr {
    width: 190px;
    height: 190px;
  }
}

