/* ============================================
   HIRAS Portfolio V68 — SPA
   M PLUS 1 Code local font, concept story descriptions
   ============================================ */

/* ── FONT FACE ─────────────────────────── */
@font-face {
  font-family: 'M PLUS 1 Code';
  src: url('/static/fonts/MPLUS1Code-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

/* ── RESET & ROOT ───────────────────────── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
:root {
  --c-bg: #050508;
  --c-text: #f0f0f0;
  --c-text-dim: #b0b0b0;
  --c-text-muted: #666666;
  --c-accent: #FDC66E;
  --active-theme-color: #FDC66E;
  --c-border: rgba(255,255,255,0.08);
  --c-glass: rgba(10,10,18,0.45);
  --c-glass-light: rgba(255,255,255,0.04);
  --c-glass-border: rgba(255,255,255,0.1);
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  --font-sans: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --header-h: 72px;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out-expo: cubic-bezier(0.87, 0, 0.13, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
}
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--c-bg);
  color: var(--c-text);
  cursor: none;
  overflow: hidden;
  height: 100%;
}
body {
  font-family: var(--font-mono);
  font-weight: 400;
  line-height: 1.6;
  overflow: hidden;
  background: var(--c-bg);
  height: 100%;
  filter: saturate(1.8);
}
a { color: inherit; text-decoration: none; cursor: none; }
button { border: none; background: none; color: inherit; font: inherit; cursor: none; outline: none; }
ul, li { list-style: none; }

/* ── LOADER ─────────────────────────────── */
.loader {
  position: fixed; inset: 0; z-index: 9999;
  background: #050508;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  transition: opacity 2s var(--ease-out-expo), visibility 2s;
}
.loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader__bg {
  position: absolute; inset: -20px; z-index: 0;
}
.loader__inner {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 28px;
}
.loader__circle-wrap {
  position: relative; width: 140px; height: 140px;
  opacity: 0; animation: fadeScaleIn 1s 0.4s var(--ease-out-expo) forwards;
}
@keyframes fadeScaleIn { from { opacity:0; transform:scale(0.88); } to { opacity:1; transform:scale(1); } }
.loader__svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.loader__track { fill: none; stroke: rgba(255,255,255,0.04); stroke-width: 0.5; }
.loader__ring {
  fill: none; stroke: var(--c-accent); stroke-width: 1; stroke-linecap: round;
  stroke-dasharray: 339.292; stroke-dashoffset: 339.292;
  transition: stroke-dashoffset 0.15s linear;
}
.loader__center-content {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center; gap: 2px;
  transition: opacity 0.8s, transform 0.8s var(--ease-out-expo);
}
.loader__number {
  font-size: 28px; font-weight: 300; letter-spacing: -0.02em;
  color: rgba(255,255,255,0.8); font-variant-numeric: tabular-nums;
}
.loader__percent { font-size: 10px; color: rgba(255,255,255,0.2); margin-top: -10px; }
.loader__enter-circle {
  position: absolute; inset: 6px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 400; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  opacity: 0; transform: scale(0.92); pointer-events: none;
  transition: all 0.6s var(--ease-out-expo);
}
.loader__enter-circle.visible { opacity: 1; transform: scale(1); pointer-events: auto; }
.loader__enter-circle:hover {
  background: rgba(255,255,255,0.9); border-color: rgba(255,255,255,0.9); color: #000;
  box-shadow: 0 0 40px rgba(255,255,255,0.25);
}
.loader__enter-circle:active { transform: scale(0.88); }
.loader__tagline { opacity: 0; animation: fadeIn 1.5s 1s forwards; }
.loader__tagline-text {
  font-size: 9px; letter-spacing: 0.3em; text-transform: uppercase;
  color: rgba(255,255,255,0.2);
}
@keyframes fadeIn { to { opacity:1; } }

/* ── CUSTOM CURSOR ──────────────────────── */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 10000;
  pointer-events: none; mix-blend-mode: difference;
}
.cursor__dot {
  position: absolute; width: 6px; height: 6px;
  background: #fff; border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s var(--ease-out-expo), height 0.3s var(--ease-out-expo);
}
.cursor__circle {
  position: absolute; width: 40px; height: 40px;
  border: 1px solid rgba(255,255,255,0.4); border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s var(--ease-out-expo), height 0.4s var(--ease-out-expo),
              border-color 0.3s, opacity 0.3s;
}
.cursor--hover .cursor__dot { width: 12px; height: 12px; }
.cursor--hover .cursor__circle {
  width: 56px; height: 56px;
  border-color: rgba(255,255,255,0.7);
}

/* ── VIGNETTE ───────────────────────────── */
.vignette {
  position: fixed; inset: 0; z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, transparent 60%, rgba(0,0,0,0.35) 100%);
}
/* PC wide screens: wider bright center, sharp dark edges, black border */
@media (min-width: 1025px) {
  .vignette {
    background: radial-gradient(ellipse at 50% 50%, transparent 50%, rgba(0,0,0,0.15) 60%, rgba(0,0,0,0.55) 75%, rgba(0,0,0,0.88) 88%, rgba(0,0,0,1.0) 100%);
  }
}

/* ── WEBGL CANVAS ───────────────────────── */
.webgl-canvas {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0;
}

/* ── APP CONTAINER ──────────────────────── */
.app {
  position: relative; z-index: 2;
  height: 100vh; overflow: hidden;
}

/* ── HEADER (glassmorphism) ─────────────── */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 36px;
  background: rgba(5,5,8,0.12);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--c-glass-border);
}
.header__left { flex: 1; }
.header__server-name {
  font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--c-text-muted);
  position: relative; padding-left: 14px;
}
.header__server-name::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 6px; height: 6px; background: var(--c-accent); border-radius: 50%;
  animation: pulse 2s infinite;
  box-shadow: 0 0 8px var(--c-accent);
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--c-accent); }
  50% { opacity: 0.6; box-shadow: 0 0 0 6px transparent; }
}
.header__center { flex: 1; text-align: center; }
.header__name {
  font-size: 14px; font-weight: 600; letter-spacing: 0.15em;
  color: var(--c-accent); text-transform: uppercase;
  transition: color 0.8s, opacity 0.3s;
}
.header__logo:hover .header__name { opacity: 0.7; }
.header__logo:active .header__name { transform: scale(0.96); }
.header__nav { flex: 1; display: flex; justify-content: flex-end; gap: 8px; }
.header__nav-link {
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--c-accent);
  position: relative; padding: 7px 14px;
  border: 1px solid transparent; border-radius: 6px;
  transition: color 0.8s, border-color 0.4s, background 0.4s, transform 0.2s;
  overflow: hidden;
}
.header__nav-link::after {
  content: ''; position: absolute; bottom: 0; left: 50%; width: 0; height: 1px;
  background: var(--c-accent); transform: translateX(-50%);
  transition: width 0.3s var(--ease-out-expo);
}
.header__nav-link:hover {
  color: var(--c-text);
  border-color: var(--c-glass-border);
  background: var(--c-glass-light);
}
.header__nav-link:hover::after { width: 60%; }
.header__nav-link:active { transform: scale(0.94); }

/* ── HOME VIEW ──────────────────────────── */
.home-view { position: relative; height: 100vh; }

/* Center Title */
.center-title {
  position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%);
  z-index: 50; text-align: center; pointer-events: none;
}
.center-title__label {
  font-size: 9px; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--c-text-muted); margin-bottom: 10px;
}
.center-title__name {
  font-family: var(--font-sans);
  font-size: clamp(20px, 3vw, 34px); font-weight: 500;
  letter-spacing: 0.04em; color: var(--c-accent);
  margin-bottom: 16px;
  text-shadow: 0 2px 24px rgba(0,0,0,0.5);
  transition: color 0.8s, opacity 0.6s, transform 0.8s var(--ease-out-expo);
}
.center-title__link-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 28px;
  border: 1px solid var(--c-accent); border-radius: 30px;
  font-size: 11px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--c-accent); pointer-events: auto;
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: all 0.6s var(--ease-out-expo);
}
.center-title__link-btn:hover {
  background: var(--c-accent); border-color: var(--c-accent); color: #000;
  box-shadow: 0 0 30px rgba(168,85,247,0.3);
}
.center-title__link-btn:active { transform: scale(0.94); }
.center-title__link-arrow { transition: transform 0.3s var(--ease-out-expo); }
.center-title__link-btn:hover .center-title__link-arrow { transform: translate(2px, -2px); }

/* Work Index (right side) */
.work-index {
  position: fixed; right: 36px; top: 50%; transform: translateY(-50%);
  z-index: 50;
  max-height: calc(100vh - 200px); overflow-y: auto; scrollbar-width: none;
}
.work-index::-webkit-scrollbar { display: none; }
.work-index__label {
  font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--c-text-muted); margin-bottom: 14px;
}
.work-index__list {
  display: flex; flex-direction: column; gap: 4px;
}
.work-index__item {
  width: fit-content;
  opacity: 0; transform: translateX(20px);
  animation: slideInRight 0.6s var(--ease-out-expo) forwards;
}
.work-index__item:nth-child(1) { animation-delay: 0.1s; }
.work-index__item:nth-child(2) { animation-delay: 0.15s; }
.work-index__item:nth-child(3) { animation-delay: 0.2s; }
.work-index__item:nth-child(4) { animation-delay: 0.25s; }
.work-index__item:nth-child(5) { animation-delay: 0.3s; }
.work-index__item:nth-child(6) { animation-delay: 0.35s; }
@keyframes slideInRight { to { opacity: 1; transform: translateX(0); } }

.work-index__link {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 4px 12px;
  text-align: left; border-radius: 6px;
  background: rgba(0,0,0,0.06);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  border: 1px solid transparent;
  border-left: 2px solid transparent;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
  transition: all 0.35s var(--ease-out-expo);
  position: relative;
}
/* Only active item gets hover effects */
.work-index__item.active .work-index__link:hover {
  background: rgba(0,0,0,0.18);
  padding-left: 16px;
  color: var(--active-theme-color);
  border-color: var(--active-theme-color);
  box-shadow: 0 0 10px color-mix(in srgb, var(--active-theme-color) 30%, transparent);
}
.work-index__item.active .work-index__link:hover .work-index__title {
  color: var(--active-theme-color) !important;
  opacity: 1 !important;
}
.work-index__item.active .work-index__link:hover .work-index__number {
  color: var(--active-theme-color) !important;
  opacity: 0.7 !important;
}
/* Non-active items: no hover color change at all, stay grey */
.work-index__item:not(.active) .work-index__link:hover {
  background: rgba(0,0,0,0.06);
  border-color: transparent;
}
.work-index__item:not(.active) .work-index__link:hover .work-index__title {
  color: rgba(255,255,255,0.6) !important;
}
.work-index__item:not(.active) .work-index__link:hover .work-index__number {
  color: rgba(255,255,255,0.35) !important;
}
.work-index__link:active { transform: scale(0.97); }

.work-index__item.active .work-index__link {
  border-left-color: var(--active-theme-color);
  background: color-mix(in srgb, var(--active-theme-color) 8%, rgba(0,0,0,0.1));
  box-shadow: 0 0 12px color-mix(in srgb, var(--active-theme-color) 20%, transparent);
  padding-left: 16px;
}
.work-index__number {
  font-size: 9px; color: rgba(255,255,255,0.35); letter-spacing: 0.1em;
  min-width: 20px; transition: color 0.35s;
  font-variant-numeric: tabular-nums;
}
.work-index__title {
  font-size: 12px; font-weight: 400; letter-spacing: 0.02em;
  color: rgba(255,255,255,0.6); transition: color 0.35s, opacity 0.35s, transform 0.35s; white-space: nowrap;
}
.work-index__item.active .work-index__title {
  color: var(--active-theme-color); opacity: 1 !important;
}
.work-index__item.active .work-index__number {
  color: var(--active-theme-color);
}
.work-index__arrow {
  margin-left: auto; opacity: 0; transform: translateX(-8px);
  transition: opacity 0.3s, transform 0.3s var(--ease-out-expo);
  color: var(--active-theme-color);
}
.work-index__link:hover .work-index__arrow { opacity: 1; transform: translateX(0); }

/* Scroll Indicator */
.scroll-indicator {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%);
  z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.scroll-indicator__track {
  width: clamp(100px, 18vw, 220px); height: 2px;
  background: rgba(255,255,255,0.06); border-radius: 1px;
  overflow: hidden; position: relative;
}
.scroll-indicator__thumb {
  position: absolute; top: 0; left: 0; height: 100%; width: 20%;
  background: var(--c-accent); border-radius: 1px;
  transition: left 0.5s var(--ease-out-expo), width 0.3s;
  box-shadow: 0 0 8px var(--c-accent);
}
.scroll-indicator__counter {
  font-size: 10px; letter-spacing: 0.12em; color: var(--c-accent);
  font-variant-numeric: tabular-nums;
  transition: color 0.8s;
}
.scroll-indicator__sep { opacity: 0.4; margin: 0 2px; }

/* Giant Number Wrap */
.giant-number-wrap {
  position: fixed; bottom: 24px; left: 36px; z-index: 40;
  pointer-events: none; user-select: none;
}
.giant-number {
  font-family: var(--font-sans);
  font-size: clamp(100px, 18vw, 260px);
  font-weight: 800; line-height: 0.82; letter-spacing: -0.05em;
  color: transparent;
  background: linear-gradient(180deg, var(--c-accent) 0%, rgba(255,255,255,0.04) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0.15;
  transition: opacity 1s, transform 1.2s var(--ease-out-expo);
}
.giant-number__ref {
  font-family: 'Courier New', monospace;
  font-size: 9px; letter-spacing: 0.15em;
  color: var(--c-accent); opacity: 0.3;
  margin-top: 4px;
  transition: color 0.8s, opacity 0.8s;
}

/* Complexity Meter */
.complexity-meter {
  position: relative; z-index: 41;
  margin-top: 8px;
  max-width: 180px;
}
.complexity-meter__label {
  font-family: 'Courier New', monospace;
  font-size: 8px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--c-accent); opacity: 0.5;
  margin-bottom: 4px;
  transition: color 0.8s;
}
.complexity-meter__value {
  font-family: var(--font-sans);
  font-size: clamp(28px, 4vw, 42px); font-weight: 300;
  color: var(--c-accent); line-height: 1;
  letter-spacing: 0.05em;
  transition: color 0.8s;
  text-shadow: 0 0 20px currentColor;
}
.complexity-meter__bar-track {
  width: 100%; height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 1.5px;
  margin-top: 6px; overflow: hidden;
}
.complexity-meter__bar-fill {
  height: 100%; width: 0%;
  background: var(--c-accent);
  border-radius: 1.5px;
  transition: width 0.8s var(--ease-out-expo), background 0.8s;
  box-shadow: 0 0 8px var(--c-accent);
}
.complexity-meter__status {
  font-family: 'Courier New', monospace;
  font-size: 7px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--c-accent); opacity: 0.35;
  margin-top: 4px;
  transition: color 0.8s;
}

/* HUD Corner Micro Text */
.hud-corner {
  position: fixed; z-index: 35;
  font-family: 'Courier New', monospace;
  font-size: 9px; letter-spacing: 0.15em;
  color: var(--c-accent); opacity: 0;
  pointer-events: none; user-select: none;
  transition: color 0.8s, opacity 1.5s;
}
.hud-corner.visible { opacity: 0.35; }
.hud-corner--tl { top: 82px; left: 36px; }
.hud-corner--tr { top: 82px; right: 36px; text-align: right; }
.hud-corner--bl { bottom: 24px; right: 36px; font-size: 16px; font-weight: 300; }
.hud-corner--br { bottom: 24px; right: 36px; margin-bottom: 20px; }

/* Work Index binary decorations */
.work-index__binary {
  font-family: 'Courier New', monospace;
  font-size: 8px; letter-spacing: 0.1em;
  color: var(--c-accent); opacity: 0.2;
  margin: 6px 0;
  transition: color 0.8s;
}

/* ── MODAL SYSTEM ───────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 400;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.18);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.8s var(--ease-out-expo), visibility 0.8s;
}
.modal-overlay.open {
  opacity: 1; visibility: visible; pointer-events: auto;
}

.modal-window {
  position: relative;
  width: min(90vw, 720px); max-height: 85vh;
  background: var(--c-glass);
  backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--c-glass-border);
  border-radius: 18px;
  overflow: hidden;
  transform: scale(0.92) translateY(24px);
  opacity: 0;
  transition: transform 1s var(--ease-out-expo), opacity 0.8s var(--ease-out-expo);
  box-shadow:
    0 32px 100px rgba(0,0,0,0.5),
    0 0 1px rgba(255,255,255,0.1),
    inset 0 1px 0 rgba(255,255,255,0.05);
}
.modal-overlay.open .modal-window {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modal__close {
  position: absolute; top: 16px; right: 16px; z-index: 10;
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.6);
  transition: all 0.3s var(--ease-out-expo);
}
.modal__close:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.3);
  color: #fff;
  transform: rotate(90deg);
}
.modal__close:active { transform: rotate(90deg) scale(0.88); }

.modal__body {
  overflow-y: auto; max-height: 85vh;
  padding: 48px 40px 40px;
  scrollbar-width: thin;
  scrollbar-color: var(--c-text-muted) transparent;
}

/* Hide all modal content by default */
.modal-content { display: none; }
.modal-content.active { display: block; }

/* Modal Typography */
.modal__page-title {
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--c-text-muted); margin-bottom: 32px; font-weight: 400;
}
.modal__header {
  display: flex; gap: 20px; align-items: center; margin-bottom: 28px;
  flex-wrap: wrap;
}
.modal__number { font-size: 11px; letter-spacing: 0.15em; color: var(--c-text-muted); }
.modal__category { font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--c-text-dim); }
.modal__year { font-size: 11px; letter-spacing: 0.15em; color: var(--c-text-muted); margin-left: auto; }
.modal__title {
  font-family: var(--font-sans);
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 500; line-height: 1.1;
  color: var(--c-text); margin-bottom: 20px;
}
.modal__color-bar {
  width: 50px; height: 3px; border-radius: 2px; margin-bottom: 32px;
  box-shadow: 0 0 12px currentColor;
}
/* Description wrap with scroll & fade mask */
.modal__description-wrap {
  position: relative;
  max-width: 560px;
  margin-bottom: 40px;
}
.modal__description-mask {
  max-height: calc(1.7em * 6 + 8px); /* ~5-6 visible lines */
  overflow-y: auto;
  position: relative;
  padding: 2px 0;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 6%, black 94%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, black 6%, black 94%, transparent 100%);
  scrollbar-width: thin;
  scrollbar-color: var(--active-theme-color) transparent;
}
.modal__description-mask::-webkit-scrollbar { width: 2px; }
.modal__description-mask::-webkit-scrollbar-track { background: transparent; }
.modal__description-mask::-webkit-scrollbar-thumb {
  background: var(--active-theme-color);
  border-radius: 1px;
  box-shadow: 0 0 6px var(--active-theme-color);
}
.modal__description {
  font-family: 'M PLUS 1 Code', 'Courier New', monospace;
  font-size: 13px; line-height: 1.7;
  color: var(--c-text-dim);
  white-space: pre-wrap;
  word-break: break-word;
  letter-spacing: 0.02em;
}
.modal__hero-text {
  font-family: var(--font-sans);
  font-size: clamp(22px, 3.5vw, 36px);
  font-weight: 500; line-height: 1.3;
  color: var(--c-text); margin-bottom: 20px;
}
.modal__body-text {
  font-size: 14px; line-height: 1.8;
  color: var(--c-text-dim); max-width: 520px; margin-bottom: 12px;
}
.modal__section {
  padding: 32px 0;
  border-top: 1px solid var(--c-glass-border);
}
.modal__section--first { border-top: none; padding-top: 0; }
.modal__section-title {
  font-size: 10px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--c-text-muted); margin-bottom: 16px;
}
.modal__section-text {
  font-family: var(--font-sans);
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 400; line-height: 1.5;
  color: var(--c-text);
}

/* Modal Meta */
.modal__meta {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--c-glass-border);
  border-bottom: 1px solid var(--c-glass-border);
  margin-bottom: 28px;
}
.modal__meta-label {
  display: block; font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--c-text-muted); margin-bottom: 6px;
}
.modal__meta-value { display: block; font-size: 13px; color: var(--c-text); }
.modal__meta-value--mono {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 11px; letter-spacing: 0.04em;
  text-transform: uppercase;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Modal Gallery */
.modal__gallery { margin-top: 20px; }
.modal__gallery-title {
  font-size: 10px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--c-text-muted); margin-bottom: 16px;
}
.modal__gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px;
}
.modal__gallery-grid--3col {
  grid-template-columns: repeat(3, 1fr);
}
.gallery-card {
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--c-glass-border);
  border-radius: 12px; padding: 22px;
  transition: border-color 0.3s, background 0.3s, transform 0.2s var(--ease-out-expo);
}
.gallery-card:hover {
  border-color: var(--active-theme-color);
  background: rgba(255,255,255,0.05);
  transform: translateY(-2px);
}
.gallery-card:active { transform: translateY(0) scale(0.98); }
.gallery-card__icon {
  margin-bottom: 14px; color: var(--c-accent); opacity: 0.6;
  transition: opacity 0.3s;
}
.gallery-card:hover .gallery-card__icon { opacity: 1; }
.gallery-card__label {
  font-family: var(--font-sans);
  font-size: 14px; font-weight: 500;
  color: var(--c-text); margin-bottom: 6px;
}
.gallery-card__desc {
  font-size: 11px; line-height: 1.6; color: var(--c-text-dim);
}

/* Awards & Tools */
.awards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 24px; }
.award-group__platform {
  font-family: var(--font-sans); font-size: 16px; font-weight: 500;
  color: var(--c-text); margin-bottom: 10px;
}
.award-item {
  font-size: 12px; color: var(--c-text-dim); padding: 3px 0;
  transition: color 0.3s;
}
.award-item:hover { color: var(--c-text); }
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 24px; }
.tool-group h3 {
  font-family: var(--font-sans); font-size: 14px; font-weight: 500;
  color: var(--c-text); margin-bottom: 10px;
}
.tool-group ul { display: flex; flex-direction: column; gap: 6px; }
.tool-group li {
  font-size: 12px; color: var(--c-text-dim); padding: 3px 0;
  transition: color 0.3s;
}
.tool-group li:hover { color: var(--c-accent); }

/* Links Grid */
.links-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px;
  margin-top: 8px;
}
.link-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 24px; border-radius: 14px;
  border: 1px solid var(--c-glass-border);
  background: rgba(255,255,255,0.02);
  transition: all 0.3s var(--ease-out-expo);
}
.link-card:hover {
  background: rgba(255,255,255,0.06);
  border-color: var(--c-accent);
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(0,0,0,0.3);
}
.link-card:active { transform: translateY(0) scale(0.97); }
.link-card__icon {
  color: var(--c-accent); opacity: 0.6;
  transition: opacity 0.3s, transform 0.3s;
}
.link-card:hover .link-card__icon { opacity: 1; transform: scale(1.1); }
.link-card__name {
  font-family: var(--font-sans); font-size: 16px; font-weight: 500; color: var(--c-text);
}
.link-card__desc { font-size: 11px; color: var(--c-text-dim); }

/* ── ANIMATIONS ─────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── RESPONSIVE ─────────────────────────── */
@media (max-width: 1024px) {
  .header { padding: 0 20px; }
  .work-index { right: 20px; }
  .center-title { bottom: 80px; }
}

@media (max-width: 768px) {
  :root { --header-h: 56px; }
  .header { padding: 0 14px; }
  .header__left { display: none; }
  .header__center { text-align: left; }
  .header__name { font-size: 12px; }
  .header__nav { gap: 6px; }
  .header__nav-link { font-size: 10px; padding: 5px 8px; }

  .work-index { display: none; }
  .center-title { bottom: 70px; }
  .center-title__name { font-size: 18px; }
  .giant-number-wrap { left: 16px; bottom: 16px; }
  .giant-number { font-size: 80px; }
  .complexity-meter { max-width: 140px; }
  .complexity-meter__value { font-size: 24px; }
  .hud-corner { display: none; }
  .work-index__binary { display: none; }
  .scroll-indicator { bottom: 20px; }

  .modal-window { width: 95vw; max-height: 90vh; border-radius: 12px; }
  .modal__body { padding: 36px 18px 28px; }
  .modal__meta { grid-template-columns: 1fr; gap: 16px; }
  .modal__gallery-grid, .modal__gallery-grid--3col { grid-template-columns: 1fr; }
  .awards-grid, .tools-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .links-grid { grid-template-columns: 1fr; }

  .cursor { display: none; }
  html { cursor: auto; }
  a, button { cursor: pointer; }
}

@media (max-width: 480px) {
  .awards-grid, .tools-grid { grid-template-columns: 1fr; }
  .center-title__link-btn { font-size: 10px; padding: 8px 20px; }
  .modal__title { font-size: 24px; }
}

/* ── SCROLLBAR ──────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--c-text-muted); border-radius: 2px; }
::selection { background: color-mix(in srgb, var(--active-theme-color) 20%, transparent); color: #fff; }
