/* ============================================================
   PlayStation 2 boot sequence — web recreation
   Pure black canvas, themed power gate, two text overlays.
   ============================================================ */

:root {
  --ps-white: #f2f5ff;
  --ps-glow: rgba(150, 180, 255, 0.55);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
  cursor: default;
}

body {
  font-family: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

#scene {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  background: #000;
  /* tiny blur softens the render to match the soft, low-res footage */
  filter: blur(0.6px) saturate(1.08);
}

/* Heavy CRT-style vignette so edges sink into pure black like a TV,
   matching the dark capture where only the centre ~55% is lit. */
#vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  background: radial-gradient(
    ellipse 72% 72% at 50% 47%,
    rgba(0, 0, 0, 0) 28%,
    rgba(0, 0, 0, 0.5) 68%,
    rgba(0, 0, 0, 0.98) 100%
  );
}

/* Animated film grain — a faint moving noise field over the picture
   to mimic the noisy, low-bitrate look of the source footage. */
#grain {
  position: fixed;
  inset: -120%;
  pointer-events: none;
  z-index: 4;
  opacity: 0.11;
  background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'>\
<filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/>\
<feColorMatrix type='saturate' values='0'/></filter>\
<rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 180px 180px;
  animation: grainShift 0.6s steps(4) infinite;
}
@keyframes grainShift {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-6%, 4%); }
  50%  { transform: translate(4%, -5%); }
  75%  { transform: translate(-3%, -3%); }
  100% { transform: translate(5%, 4%); }
}

/* ---------- Text overlays ---------- */
.overlay {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  white-space: nowrap;
  will-change: opacity;
}

/* "Sony Computer Entertainment" — clean caption near vertical centre,
   just below the cube cluster, exactly as framed in the video. */
.sony {
  top: 50%;
  transform: translate(-50%, -50%);
  color: #f4f6ff;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(15px, 2.4vw, 30px);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-shadow: 0 0 9px rgba(190, 205, 255, 0.3);
}

/* "PlayStation 2" wordmark, centred.
   Two visual states drive the reveal:
     - default ............ bluish, heavy glow (with the JS blur this
                            reads as the blurry blue haze it grows from)
     - .sharp (added in JS) crisp white wordmark with a soft glow
   The JS animates `filter: blur()` from ~13px down to 0 in parallel. */
.ps2-logo {
  top: 50%;
  transform: translate(-50%, -50%);
  font-weight: 300;
  line-height: 1;
  user-select: none;
  will-change: opacity, filter;
  color: #9fb6ff;
  text-shadow:
    0 0 10px rgba(120, 160, 255, 0.95),
    0 0 28px rgba(90, 130, 255, 0.8),
    0 0 60px rgba(70, 110, 240, 0.6);
  transition: color 0.5s ease, text-shadow 0.5s ease;
}
.ps2-logo.sharp {
  color: var(--ps-white);
  text-shadow:
    0 0 2px rgba(255, 255, 255, 0.9),
    0 0 14px var(--ps-glow),
    0 0 34px rgba(120, 150, 255, 0.35);
}

.ps-word {
  font-size: clamp(34px, 7vw, 92px);
  letter-spacing: -0.01em;
}

.ps-dot {
  font-size: clamp(34px, 7vw, 92px);
  position: relative;
  left: 0.02em;
  bottom: -0.04em;
  opacity: 0.95;
}

.ps-two {
  font-size: clamp(40px, 8.4vw, 112px);
  font-weight: 400;
  margin-left: 0.04em;
}

/* ---------- Replay button ---------- */
.replay {
  position: fixed;
  left: 50%;
  bottom: 9%;
  transform: translateX(-50%);
  z-index: 8;
  padding: 11px 22px;
  background: rgba(20, 26, 48, 0.5);
  color: #cdd7ff;
  border: 1px solid rgba(150, 175, 255, 0.4);
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: 0.04em;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background 0.25s ease, transform 0.15s ease, opacity 0.6s ease;
  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
}
.replay:hover { background: rgba(40, 52, 96, 0.7); }
.replay:active { transform: translateX(-50%) scale(0.96); }

@keyframes fadeIn { to { opacity: 1; } }

/* ---------- Power-on gate ---------- */
.power-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  background: #000;
  transition: opacity 0.8s ease;
}
.power-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.power-btn {
  position: relative;
  width: 116px;
  height: 116px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, #11203f, #050a16 70%);
  border: 1px solid rgba(120, 150, 255, 0.35);
  color: #aebfff;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.6) inset,
    0 0 34px rgba(70, 110, 220, 0.25);
  transition: transform 0.18s ease, box-shadow 0.3s ease;
}
.power-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 50px rgba(90, 130, 255, 0.5);
}
.power-btn:active { transform: scale(0.97); }

.power-symbol {
  font-size: 46px;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(120, 160, 255, 0.7));
}

.power-ring {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1px solid rgba(120, 160, 255, 0.4);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { transform: scale(0.9);  opacity: 0.8; }
  70%  { transform: scale(1.25); opacity: 0; }
  100% { transform: scale(1.25); opacity: 0; }
}

.power-hint {
  color: #5e6c92;
  font-size: 14px;
  letter-spacing: 0.08em;
}

@media (max-width: 520px) {
  .power-btn { width: 96px; height: 96px; }
  .power-symbol { font-size: 38px; }
}

/* ============================================================
   Boot -> menu hand-off
   ============================================================ */
body.booted {
  background: radial-gradient(ellipse 90% 85% at 50% 42%, #0b1736 0%, #060c20 55%, #01030a 100%);
}
body.booted #scene,
body.booted #grain,
body.booted #sony,
body.booted #logo,
body.booted #replay {
  opacity: 0 !important;
  pointer-events: none;
  transition: opacity 0.9s ease;
}

/* ---------- Skip button (during boot) ---------- */
.skip-btn {
  position: fixed; right: 22px; bottom: 20px; z-index: 15;
  appearance: none; cursor: pointer;
  background: rgba(15, 25, 50, 0.6); color: #aebfe6;
  border: 1px solid rgba(140, 170, 255, 0.35); border-radius: 999px;
  padding: 9px 18px; font: 14px "Segoe UI", Helvetica, Arial, sans-serif;
  letter-spacing: 0.08em; backdrop-filter: blur(4px);
  transition: background 0.2s ease, transform 0.12s ease, opacity 0.4s ease;
}
.skip-btn:hover { background: rgba(35, 55, 110, 0.8); color: #fff; }
.skip-btn:active { transform: scale(0.96); }

/* ============================================================
   PS2 main menu (portfolio dashboard)
   ============================================================ */
#menuScene {
  position: fixed; inset: 0; width: 100vw; height: 100vh;
  z-index: 8; display: block; pointer-events: none;
}

.menu {
  position: fixed; inset: 0; z-index: 9;
  display: flex; flex-direction: column;
  opacity: 0; pointer-events: none;
  transition: opacity 0.9s ease;
  color: #e6edff;
  font-family: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.menu.shown { opacity: 1; pointer-events: auto; }

.menu-topbar {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: clamp(18px, 3vw, 40px) clamp(20px, 4vw, 56px) 0;
}
.brand-name {
  display: block; font-size: clamp(20px, 2.4vw, 30px); font-weight: 700;
  letter-spacing: 0.18em; text-shadow: 0 0 16px rgba(120, 160, 255, 0.5);
}
.brand-sub {
  display: block; font-size: clamp(11px, 1.2vw, 14px); letter-spacing: 0.32em;
  color: #7e93c8; text-transform: uppercase; margin-top: 2px;
}
.menu-clock { text-align: right; font-variant-numeric: tabular-nums; }
#mClock {
  display: block; font-size: clamp(22px, 2.6vw, 34px); font-weight: 300;
  letter-spacing: 0.05em; text-shadow: 0 0 14px rgba(120, 160, 255, 0.4);
}
#mDate { display: block; font-size: clamp(11px, 1.1vw, 13px); color: #7e93c8; letter-spacing: 0.18em; }

.menu-icons {
  flex: 1; display: flex; align-items: center; justify-content: center;
  gap: clamp(16px, 4vw, 70px); flex-wrap: wrap;
  transition: opacity 0.3s ease, filter 0.3s ease;
}
.menu-icon {
  appearance: none; background: none; border: 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  color: #aebfe6; padding: 10px;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), color 0.28s ease;
}
.menu-icon-art {
  width: clamp(74px, 9vw, 122px); height: clamp(74px, 9vw, 122px);
  display: grid; place-items: center; border-radius: 20px;
  background: linear-gradient(160deg, rgba(40, 64, 120, 0.5), rgba(12, 22, 48, 0.6));
  border: 1px solid rgba(130, 165, 255, 0.22);
  box-shadow: inset 0 0 24px rgba(60, 100, 200, 0.15), 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: inherit;
}
.menu-icon-art svg { width: 52%; height: 52%; opacity: 0.9; }
.menu-icon-label {
  font-size: clamp(13px, 1.4vw, 17px); letter-spacing: 0.14em;
  text-transform: uppercase; opacity: 0.7; transition: inherit;
}
.menu-icon.is-selected { color: #fff; transform: translateY(-10px) scale(1.12); }
.menu-icon.is-selected .menu-icon-art {
  border-color: rgba(150, 185, 255, 0.8);
  background: linear-gradient(160deg, rgba(70, 110, 210, 0.7), rgba(20, 38, 90, 0.8));
  box-shadow: inset 0 0 30px rgba(120, 160, 255, 0.35),
              0 0 40px rgba(90, 140, 255, 0.5), 0 14px 36px rgba(0, 0, 0, 0.6);
}
.menu-icon.is-selected .menu-icon-label { opacity: 1; text-shadow: 0 0 12px rgba(120, 160, 255, 0.6); }

.menu.dimmed .menu-icons { opacity: 0.18; filter: blur(3px); }
.menu.dimmed .menu-hint { opacity: 0; }

.menu-hint { text-align: center; padding-bottom: 8px; color: #6b7da8; font-size: 13px; letter-spacing: 0.12em; }
.menu-hint kbd {
  display: inline-block; padding: 1px 7px; margin: 0 1px;
  border: 1px solid rgba(140, 170, 255, 0.3); border-radius: 5px;
  font-family: inherit; color: #aebfe6;
}
.menu-version { text-align: center; padding-bottom: clamp(14px, 2.5vw, 28px); color: #43507a; font-size: 11px; letter-spacing: 0.22em; }

/* ============================================================
   Section panels (Projects / About / Skills / Contact)
   ============================================================ */
.section-panel {
  position: fixed; inset: 0; z-index: 12;
  display: flex; flex-direction: column;
  background: radial-gradient(ellipse 95% 90% at 50% 40%, rgba(10, 22, 52, 0.93), rgba(3, 7, 18, 0.97));
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.34s ease, transform 0.34s cubic-bezier(0.16, 1, 0.3, 1);
  color: #e6edff; font-family: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.section-panel.shown { opacity: 1; transform: none; }
.section-inner {
  width: min(1040px, 92vw); margin: 0 auto; flex: 1;
  display: flex; flex-direction: column; padding: clamp(20px, 4vw, 46px) 0; min-height: 0;
}
.section-head { display: flex; align-items: center; gap: 22px; padding-bottom: 18px; border-bottom: 1px solid rgba(120, 160, 255, 0.15); }
.back-btn {
  appearance: none; cursor: pointer; background: rgba(30, 50, 100, 0.5); color: #cdd9ff;
  border: 1px solid rgba(140, 175, 255, 0.35); border-radius: 999px;
  padding: 9px 18px; font: inherit; font-size: 14px; letter-spacing: 0.06em;
  transition: background 0.2s ease, transform 0.12s ease;
}
.back-btn:hover { background: rgba(50, 80, 150, 0.7); }
.back-btn:active { transform: scale(0.96); }
.section-title { font-size: clamp(22px, 3.4vw, 40px); font-weight: 700; letter-spacing: 0.16em; text-shadow: 0 0 18px rgba(120, 160, 255, 0.4); }
.section-body { flex: 1; overflow-y: auto; padding: 26px 4px; min-height: 0; }
.section-foot { text-align: center; color: #4a577f; font-size: 12px; letter-spacing: 0.14em; padding-top: 14px; }

/* Projects */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.proj-card {
  background: linear-gradient(165deg, rgba(28, 46, 92, 0.5), rgba(10, 18, 40, 0.6));
  border: 1px solid rgba(130, 165, 255, 0.2); border-radius: 14px; overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}
.proj-card:hover { transform: translateY(-6px); border-color: rgba(150, 185, 255, 0.6); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(80, 130, 255, 0.25); }
.proj-thumb {
  aspect-ratio: 16 / 10; background: linear-gradient(135deg, #13234a, #0a1430);
  background-size: cover; background-position: center; display: grid; place-items: center; color: rgba(150, 185, 255, 0.5);
}
.proj-thumb-ph { font-size: 34px; }
.proj-meta { padding: 14px 16px 18px; }
.proj-meta h3 { font-size: 18px; margin-bottom: 4px; }
.proj-tag { display: inline-block; font-size: 11px; letter-spacing: 0.1em; color: #7e93c8; text-transform: uppercase; margin-bottom: 10px; }
.proj-meta p { font-size: 13.5px; line-height: 1.5; color: #b7c4e6; }
.proj-link { display: inline-block; margin-top: 12px; color: #9fc0ff; font-size: 13px; letter-spacing: 0.05em; text-decoration: none; border-bottom: 1px solid rgba(150, 185, 255, 0.4); padding-bottom: 1px; }
.proj-link:hover { color: #fff; }

/* About */
.about-wrap { display: flex; gap: clamp(22px, 4vw, 48px); flex-wrap: wrap; align-items: flex-start; }
.about-photo {
  width: clamp(140px, 18vw, 220px); aspect-ratio: 1; flex: none; border-radius: 18px;
  background: linear-gradient(135deg, #1a2e5c, #0a1430); background-size: cover; background-position: center;
  display: grid; place-items: center; font-size: 64px; color: rgba(150, 185, 255, 0.5);
  border: 1px solid rgba(130, 165, 255, 0.25);
}
.about-text { flex: 1; min-width: 260px; }
.about-text h3 { font-size: clamp(24px, 3vw, 34px); letter-spacing: 0.06em; }
.about-role { color: #9fb0dc; letter-spacing: 0.08em; margin: 6px 0 18px; }
.about-bio { font-size: 16px; line-height: 1.7; color: #c4d0ef; max-width: 62ch; }

/* Skills */
.skills-wrap { display: flex; flex-direction: column; gap: 24px; }
.skill-group h4 { font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; color: #7e93c8; margin-bottom: 12px; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.skill-tag {
  padding: 8px 16px; border-radius: 999px; background: rgba(40, 64, 120, 0.4);
  border: 1px solid rgba(130, 165, 255, 0.25); font-size: 14px; color: #cdd9ff;
  transition: background 0.2s ease, transform 0.12s ease;
}
.skill-tag:hover { background: rgba(60, 95, 180, 0.55); transform: translateY(-2px); }

/* Contact */
.contact-wrap { display: flex; flex-direction: column; gap: 12px; max-width: 560px; }
.contact-row {
  display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-radius: 12px;
  background: linear-gradient(165deg, rgba(28, 46, 92, 0.45), rgba(10, 18, 40, 0.55));
  border: 1px solid rgba(130, 165, 255, 0.2); text-decoration: none; color: #e6edff;
  transition: transform 0.18s ease, border-color 0.2s ease, background 0.2s ease;
}
.contact-row:hover { transform: translateX(6px); border-color: rgba(150, 185, 255, 0.6); background: rgba(50, 80, 150, 0.4); }
.contact-row--disabled { opacity: 0.5; }
.contact-label { width: 92px; flex: none; color: #7e93c8; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; }
.contact-value { flex: 1; font-size: 15px; }
.contact-go { color: #9fc0ff; }

/* Projects: language filter (sticky) + category groups */
.proj-filter {
  display: flex; flex-wrap: wrap; gap: 8px;
  position: sticky; top: 0; z-index: 3;
  padding: 4px 0 12px;
  background: linear-gradient(rgba(5, 10, 26, 0.96) 60%, rgba(5, 10, 26, 0));
}
.pf-btn {
  appearance: none; cursor: pointer; font: inherit; font-size: 13px; letter-spacing: 0.06em;
  color: #aebfe6; background: rgba(28, 46, 92, 0.4);
  border: 1px solid rgba(130, 165, 255, 0.22); border-radius: 999px; padding: 7px 14px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.12s ease;
}
.pf-btn span { opacity: 0.6; font-size: 11px; margin-left: 2px; }
.pf-btn:hover { background: rgba(50, 80, 150, 0.5); color: #fff; }
.pf-btn:active { transform: scale(0.96); }
.pf-btn.is-active {
  background: linear-gradient(160deg, rgba(70, 110, 210, 0.85), rgba(30, 55, 120, 0.9));
  color: #fff; border-color: rgba(150, 185, 255, 0.7); box-shadow: 0 0 18px rgba(90, 140, 255, 0.35);
}
.pf-btn.is-active span { opacity: 0.85; }

.proj-group { margin-top: 26px; }
.proj-group[hidden] { display: none; }
.proj-group-title {
  font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; color: #7e93c8;
  margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid rgba(120, 160, 255, 0.12);
}
.proj-links { display: flex; gap: 16px; margin-top: 12px; }
.proj-link--demo { color: #8effc0; border-bottom-color: rgba(140, 255, 190, 0.4); }
.proj-link--demo:hover { color: #fff; }

/* About: tagline + highlight stats */
.about-tagline { font-size: clamp(16px, 1.8vw, 20px); color: #dbe6ff; line-height: 1.5; margin: 4px 0 18px; font-weight: 500; }
.about-highlights { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 22px; }
.about-stat {
  display: flex; flex-direction: column; gap: 3px; padding: 12px 18px; border-radius: 12px;
  background: linear-gradient(165deg, rgba(28, 46, 92, 0.45), rgba(10, 18, 40, 0.55));
  border: 1px solid rgba(130, 165, 255, 0.2); min-width: 110px;
}
.about-stat-v { font-size: 15px; font-weight: 600; color: #e6edff; }
.about-stat-k { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: #7e93c8; }

/* Contact: static (copy) rows */
.contact-row--static { appearance: none; cursor: pointer; width: 100%; text-align: left; font: inherit; }
.contact-copy {
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: #7e93c8;
  border: 1px solid rgba(140, 170, 255, 0.25); border-radius: 6px; padding: 2px 8px;
}
.contact-row--static:hover .contact-copy { color: #fff; border-color: rgba(150, 185, 255, 0.6); }

/* Skills: accent group cards (replaces the old flat list) */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 18px; }
.skill-card {
  background: linear-gradient(165deg, rgba(28, 46, 92, 0.45), rgba(10, 18, 40, 0.6));
  border: 1px solid rgba(130, 165, 255, 0.18);
  border-left: 3px solid var(--accent, #5b9bff);
  border-radius: 14px; padding: 18px 20px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}
.skill-card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 0 0 24px rgba(90, 140, 255, 0.22); }
.skill-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.skill-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent, #5b9bff); box-shadow: 0 0 12px var(--accent, #5b9bff); flex: none; }
.skill-card-head h4 { font-size: 15px; letter-spacing: 0.08em; color: #eaf0ff; flex: 1; text-transform: none; margin: 0; }
.skill-count { font-size: 12px; color: #7e93c8; background: rgba(255, 255, 255, 0.05); border-radius: 999px; padding: 2px 9px; }

/* ============================================================
   PS2 Memory Card Browser (section screens)
   ============================================================ */
.mc-inner { overflow: hidden; }
.mc-stage { flex: 1; min-height: 0; display: flex; gap: clamp(18px, 3vw, 40px); padding-top: 14px; align-items: center; }

/* horizontal strip of rotating 3D blocks */
.mc-strip {
  flex: 1; min-width: 0; display: flex; gap: 26px; align-items: center;
  overflow-x: auto; overflow-y: hidden; padding: 64px 38%; scrollbar-width: none;
}
.mc-strip::-webkit-scrollbar { display: none; }

.mc-block {
  flex: none; background: none; border: 0; cursor: pointer; perspective: 620px; padding: 4px;
  display: flex; flex-direction: column; align-items: center; gap: 16px; opacity: 0.5;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}
.mc-block.is-sel { transform: scale(1.65); opacity: 1; z-index: 2; }

.mc-cube {
  --s: 64px; width: var(--s); height: var(--s); position: relative;
  transform-style: preserve-3d; transform: rotateX(-16deg) rotateY(-22deg);
}
.mc-block.is-sel .mc-cube { animation: mcspin 7s linear infinite; }
@keyframes mcspin {
  from { transform: rotateX(-12deg) rotateY(0deg); }
  to   { transform: rotateX(-12deg) rotateY(360deg); }
}
.cf {
  position: absolute; inset: 0; display: grid; place-items: center;
  border: 1px solid rgba(150, 185, 255, 0.55); border-radius: 9px;
  background: linear-gradient(150deg, rgba(110, 150, 245, 0.55), rgba(24, 46, 110, 0.8));
  box-shadow: inset 0 0 18px rgba(120, 160, 255, 0.3);
  color: #eaf0ff; font: 700 15px/1 "Segoe UI", Arial, sans-serif; letter-spacing: 0.03em;
}
.cf-f { transform: translateZ(calc(var(--s) / 2)); }
.cf-b { transform: rotateY(180deg) translateZ(calc(var(--s) / 2)); }
.cf-r { transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); }
.cf-l { transform: rotateY(-90deg) translateZ(calc(var(--s) / 2)); }
.mc-block.is-sel .cf { box-shadow: inset 0 0 22px rgba(150, 185, 255, 0.45), 0 0 30px rgba(90, 140, 255, 0.5); }

.mc-block-label {
  font-size: 12px; letter-spacing: 0.08em; color: #aebfe6; max-width: 120px;
  text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 0.2s ease;
}
.mc-block.is-sel .mc-block-label { color: #fff; text-shadow: 0 0 12px rgba(120, 160, 255, 0.6); }

/* detail panel */
.mc-detail {
  flex: none; width: clamp(280px, 34vw, 380px); max-height: 100%; overflow-y: auto;
  background: linear-gradient(165deg, rgba(20, 36, 76, 0.6), rgba(8, 16, 38, 0.72));
  border: 1px solid rgba(130, 165, 255, 0.25); border-radius: 16px; padding: 22px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}
.mc-shot { width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; background: #0b1530 center/cover no-repeat; border: 1px solid rgba(130, 165, 255, 0.2); margin-bottom: 16px; }
.mc-shot--photo { aspect-ratio: 1; max-width: 150px; display: grid; place-items: center; font-size: 64px; color: rgba(150, 185, 255, 0.5); }
.mc-d-title { font-size: 22px; letter-spacing: 0.04em; margin-bottom: 6px; }
.mc-d-tag { display: inline-block; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: #9fc0ff; background: rgba(90, 140, 255, 0.15); border: 1px solid rgba(130, 165, 255, 0.3); border-radius: 999px; padding: 3px 11px; margin-bottom: 14px; }
.mc-d-desc { font-size: 14.5px; line-height: 1.6; color: #c4d0ef; margin-bottom: 12px; }
.mc-d-tagline { font-size: 16px; color: #dbe6ff; line-height: 1.5; margin-bottom: 12px; }
.mc-d-value { font-size: 17px; color: #eaf0ff; margin: 6px 0 16px; word-break: break-all; }
.mc-d-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.mc-btn {
  appearance: none; cursor: pointer; font: inherit; font-size: 13px; letter-spacing: 0.05em; text-decoration: none;
  color: #fff; background: linear-gradient(160deg, #3f74d8, #274a92); border: 1px solid rgba(150, 185, 255, 0.6);
  border-radius: 999px; padding: 9px 18px; transition: transform 0.12s ease, box-shadow 0.2s ease;
}
.mc-btn:hover { box-shadow: 0 0 20px rgba(90, 140, 255, 0.5); }
.mc-btn:active { transform: scale(0.96); }
.mc-btn--alt { background: rgba(30, 50, 100, 0.5); }
.mc-tags { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 6px; }
.mc-tag { padding: 7px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(130, 165, 255, 0.25); font-size: 13.5px; color: #cdd9ff; }
.mc-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.mc-stat { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(130, 165, 255, 0.2); }
.mc-stat b { font-size: 14px; color: #eaf0ff; }
.mc-stat span { font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: #7e93c8; }
.mc-empty { color: #7e93c8; }

@media (max-width: 720px) {
  .mc-stage { flex-direction: column; }
  .mc-strip { flex: none; padding: 34px 34%; }
  .mc-detail { width: 100%; }
}

/* ============================================================
   PS2 Memory Card Browser — real 3D cover-flow
   ============================================================ */
.mc3-inner { overflow: hidden; }
.mc3-stage { flex: 1; min-height: 0; position: relative; }
#mc3d { width: 100%; height: 100%; display: block; cursor: pointer; }

.mc3-bar {
  flex: none; max-height: 34vh; overflow-y: auto;
  display: flex; gap: 22px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  margin-top: 10px; padding: 16px 22px; border-radius: 14px;
  background: linear-gradient(165deg, rgba(20, 36, 76, 0.6), rgba(8, 16, 38, 0.72));
  border: 1px solid rgba(130, 165, 255, 0.25); box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
}
.mc3-info { flex: 1; min-width: 240px; }
.mc3-info h3 { font-size: 21px; letter-spacing: 0.03em; margin-bottom: 6px; }
.mc3-tag { display: inline-block; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: #9fc0ff;
  background: rgba(90, 140, 255, 0.15); border: 1px solid rgba(130, 165, 255, 0.3); border-radius: 999px; padding: 3px 11px; margin-bottom: 8px; }
.mc3-info p { font-size: 14px; line-height: 1.55; color: #c4d0ef; margin-bottom: 6px; }
.mc3-val { font-size: 16px; color: #eaf0ff; word-break: break-all; }
.mc3-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.mc3-actions.mc3-tags, .mc3-about .mc3-tags { margin-top: 8px; }
.mc3-about { max-width: 100%; }
.mc3-about p { color: #c4d0ef; }

@media (max-width: 720px) {
  .mc3-bar { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   Section panels — About / Skills / Contact
   ============================================================ */
.pnl-inner { overflow: hidden; }
.pnl-body { flex: 1; min-height: 0; overflow-y: auto; display: flex; align-items: center; justify-content: center; padding: 18px 4px; }

/* About profile card */
.ab-card { display: flex; gap: 32px; width: 100%; max-width: 860px; padding: 30px; align-items: flex-start;
  border-radius: 18px; background: linear-gradient(165deg, rgba(20, 36, 76, 0.6), rgba(8, 16, 38, 0.72));
  border: 1px solid rgba(130, 165, 255, 0.25); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); }
.ab-photo { flex: none; width: 160px; height: 160px; border-radius: 16px; display: grid; place-items: center;
  background: linear-gradient(135deg, #1a2e5c, #0a1430) center/cover; font-size: 70px; color: rgba(150, 185, 255, 0.5);
  border: 1px solid rgba(130, 165, 255, 0.3); box-shadow: inset 0 0 30px rgba(120, 160, 255, 0.2); }
.ab-body { flex: 1; min-width: 0; }
.ab-name { font-size: 30px; letter-spacing: 0.04em; }
.ab-role { color: #9fb0dc; letter-spacing: 0.08em; margin: 6px 0 14px; }
.ab-tagline { font-size: 18px; color: #dbe6ff; line-height: 1.5; margin-bottom: 14px; }
.ab-bio p { font-size: 15px; line-height: 1.7; color: #c4d0ef; margin-bottom: 10px; }
.ab-stats { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.ab-stat { display: flex; flex-direction: column; gap: 2px; padding: 10px 16px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(130, 165, 255, 0.2); }
.ab-stat b { font-size: 15px; color: #eaf0ff; }
.ab-stat span { font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: #7e93c8; }

/* Skills tabs + chips */
.sk-wrap { width: 100%; max-width: 820px; display: flex; flex-direction: column; gap: 28px; align-items: center; }
.sk-tabs { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.sk-tab { appearance: none; cursor: pointer; font: inherit; font-size: 14px; letter-spacing: 0.04em; color: #aebfe6;
  background: rgba(28, 46, 92, 0.4); border: 1px solid rgba(130, 165, 255, 0.22); border-radius: 999px; padding: 9px 18px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease; }
.sk-tab span { opacity: 0.6; font-size: 11px; margin-left: 3px; }
.sk-tab:hover { background: rgba(50, 80, 150, 0.5); color: #fff; }
.sk-tab.is-active { color: #fff; border-color: var(--accent, #5b9bff); background: rgba(255, 255, 255, 0.07); box-shadow: 0 0 18px rgba(120, 160, 255, 0.4); }
.sk-chips { display: flex; flex-wrap: wrap; gap: 13px; justify-content: center; max-width: 760px; }
.sk-chip { padding: 12px 22px; border-radius: 12px; font-size: 16px; color: #eaf0ff;
  background: linear-gradient(165deg, rgba(40, 64, 120, 0.5), rgba(14, 24, 52, 0.6));
  border: 1px solid rgba(130, 165, 255, 0.3); border-bottom: 2px solid var(--accent, #5b9bff);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); }
.sk-chips.anim .sk-chip { animation: skchip 0.4s both; }
@keyframes skchip { from { opacity: 0; transform: translateY(10px) scale(0.96); } to { opacity: 1; transform: none; } }

/* Contact tiles */
.ct-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; width: 100%; max-width: 720px; }
.ct-tile { display: flex; align-items: center; gap: 15px; padding: 17px 20px; border-radius: 14px; text-decoration: none; cursor: pointer;
  background: linear-gradient(165deg, rgba(28, 46, 92, 0.5), rgba(10, 18, 40, 0.6)); border: 1px solid rgba(130, 165, 255, 0.22);
  color: #e6edff; font: inherit; text-align: left; transition: transform 0.18s ease, border-color 0.2s ease, box-shadow 0.2s ease; }
.ct-tile:hover { transform: translateY(-3px); border-color: rgba(150, 185, 255, 0.6); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45), 0 0 24px rgba(90, 140, 255, 0.25); }
.ct-badge { flex: none; width: 46px; height: 46px; border-radius: 11px; display: grid; place-items: center; font-weight: 700; font-size: 15px;
  background: linear-gradient(150deg, rgba(110, 150, 245, 0.5), rgba(24, 46, 110, 0.8)); border: 1px solid rgba(150, 185, 255, 0.4); color: #eaf0ff; }
.ct-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.ct-label { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: #7e93c8; }
.ct-value { font-size: 16px; color: #eaf0ff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-go { color: #9fc0ff; font-size: 13px; flex: none; }

@media (max-width: 680px) {
  .ab-card { flex-direction: column; align-items: center; text-align: center; }
  .ab-stats { justify-content: center; }
}

@media (max-width: 560px) {
  .menu-icons { gap: 14px; }
  .about-wrap { flex-direction: column; align-items: center; text-align: center; }
  .about-highlights { justify-content: center; }
}

/* ============================================================
   PS2 GLASS THEME — About / Skills / Contact
   Make non-project sections feel like the PS2 system menu:
   translucent frosted panel over the live floating-dot field,
   glossy "ice glass" cards with specular sheen + cyan rim glow.
   (Appended last so it overrides the plain-card rules above.)
   ============================================================ */

/* 1) The section veil becomes frosted glass: the animated PS2
      dot-field (#menuScene, z8) glows through instead of being
      hidden behind a flat fill. The dashboard fades fully so its
      brand/clock text doesn't ghost behind the glass. */
.section-panel {
  background:
    radial-gradient(ellipse 120% 105% at 50% 30%, rgba(22, 52, 116, 0.42), rgba(6, 14, 34, 0.74) 62%, rgba(2, 6, 18, 0.9));
  -webkit-backdrop-filter: blur(3px) saturate(1.18);
  backdrop-filter: blur(3px) saturate(1.18);
}
.menu.dimmed { opacity: 0; pointer-events: none; }

/* 2) Shared PS2 glass surface for the three section panels */
.about-wrap,
.skill-card,
.contact-row {
  position: relative;
  background: linear-gradient(158deg, rgba(86, 132, 222, 0.22), rgba(16, 34, 80, 0.36));
  border: 1px solid rgba(165, 200, 255, 0.32);
  -webkit-backdrop-filter: blur(11px) saturate(1.25);
  backdrop-filter: blur(11px) saturate(1.25);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    inset 0 0 30px rgba(74, 124, 222, 0.12),
    0 16px 44px rgba(0, 0, 0, 0.52),
    0 0 32px rgba(74, 132, 255, 0.14);
  overflow: hidden;
}
/* specular top sheen — the glossy PS2 reflection */
.about-wrap::before,
.skill-card::before,
.contact-row::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 46%;
  background: linear-gradient(rgba(255, 255, 255, 0.20), rgba(255, 255, 255, 0));
  pointer-events: none;
}
/* keep real content above the sheen */
.about-wrap > *,
.skill-card > *,
.contact-row > * { position: relative; z-index: 1; }

/* 3) About — one big glossy ID panel + glassy portrait frame */
.about-wrap {
  padding: clamp(22px, 3vw, 40px);
  border-radius: 20px;
  align-items: center;
}
.about-photo {
  border: 1px solid rgba(175, 210, 255, 0.45);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.35),
    inset 0 0 34px rgba(86, 146, 255, 0.28),
    0 12px 30px rgba(0, 0, 0, 0.5);
  position: relative; overflow: hidden;
}
.about-photo::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 52%;
  background: linear-gradient(rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0));
  pointer-events: none;
}
.about-text h3 { text-shadow: 0 0 18px rgba(120, 165, 255, 0.45); }

/* 4) Skills — glossy accent cards + glass pills */
.skill-card {
  border-left: 3px solid var(--accent, #5b9bff);
  border-radius: 16px;
}
.skill-card:hover {
  transform: translateY(-5px);
  border-color: rgba(175, 210, 255, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    0 20px 48px rgba(0, 0, 0, 0.55),
    0 0 34px color-mix(in srgb, var(--accent, #5b9bff) 55%, transparent);
}
.skill-dot { box-shadow: 0 0 14px var(--accent, #5b9bff), 0 0 4px var(--accent, #5b9bff); }
.skill-tag {
  background: rgba(120, 162, 240, 0.16);
  border: 1px solid rgba(170, 205, 255, 0.30);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  color: #dbe6ff;
}
.skill-tag:hover { background: rgba(120, 162, 240, 0.32); transform: translateY(-2px); }

/* 5) Contact — glossy rows with a PS2 memory-card-style icon badge */
.contact-wrap { gap: 14px; }
.contact-row {
  border-radius: 14px;
  gap: 16px;
  padding: 15px 20px;
}
.contact-row:hover {
  transform: translateX(6px);
  border-color: rgba(175, 210, 255, 0.55);
  background: linear-gradient(158deg, rgba(96, 144, 234, 0.30), rgba(20, 42, 96, 0.42));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    0 12px 32px rgba(0, 0, 0, 0.48),
    0 0 28px rgba(96, 152, 255, 0.26);
}
.ct-ico {
  flex: none; width: 48px; height: 48px; border-radius: 13px;
  display: grid; place-items: center; color: #eaf0ff;
  background: linear-gradient(150deg, rgba(126, 166, 248, 0.5), rgba(24, 48, 112, 0.78));
  border: 1px solid rgba(170, 205, 255, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 0 16px rgba(120, 165, 255, 0.25),
    0 6px 16px rgba(0, 0, 0, 0.4);
}
.ct-ico svg { width: 23px; height: 23px; }
.contact-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.contact-row .contact-label { width: auto; margin-bottom: 2px; }
.contact-row .contact-value { font-size: 16px; color: #eaf0ff; word-break: break-word; }
.contact-go { font-size: 14px; text-shadow: 0 0 10px rgba(120, 165, 255, 0.5); }
