/* ==========================================================================
   Stash: Creative Resource Directory Replica for Soham Thorat Portfolio
   Faithfully inspired by stash.cool architecture, typography & micro-interactions
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap');

:root {
  --u: clamp(1px, calc(0.212px + 0.0769vw), 1.4px);
  --hh: calc(44 * var(--u));
  --pad: clamp(16px, 2.5vw, 40px);
  --col: 260px;
  
  /* Dark Luxury Default (matches Soham Thorat theme) */
  --bg: #090514;
  --fg: #f5f3ff;
  --muted: #a78bfa;
  --muted-soft: rgba(216, 180, 254, 0.65);
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(192, 132, 252, 0.4);
  --accent: #c084fc;
  --gold: #f2b134;
  --blue: #818cf8;
  --wash: #130a24;
  --wash-card: #190f30;
  --ease: cubic-bezier(.7, 0, .2, 1);
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "Space Mono", monospace;
  --t: calc(12 * var(--u));
  color-scheme: dark;
}

/* Light Mode Toggle */
:root[data-theme="light"] {
  --bg: #ffffff;
  --fg: #0a0a0a;
  --muted: #6b7280;
  --muted-soft: rgba(107, 114, 128, 0.8);
  --line: #e5e7eb;
  --line-strong: #0a0a0a;
  --accent: #7c3aed;
  --gold: #d97706;
  --blue: #2563eb;
  --wash: #f3f4f6;
  --wash-card: #f9fafb;
  color-scheme: light;
}

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

html {
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--fg);
  font: 400 calc(15 * var(--u)) / 1.35 var(--sans);
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* 1. Header & Navigation ————————————————————————————————————————————————— */
.site-head {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--hh);
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: clamp(14px, 2vw, 32px);
  padding: 0 var(--pad);
  font-size: var(--t);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand-wrap {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.site-brand {
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: calc(14 * var(--u));
  color: var(--fg);
}

.site-brand span {
  color: var(--accent);
}

.site-subtitle {
  color: var(--muted);
  font-size: calc(11 * var(--u));
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.h-status {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted-soft);
  font-size: calc(11 * var(--u));
  font-family: var(--mono);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  display: inline-block;
  animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.head-actions {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.8vw, 24px);
  justify-self: end;
}

.theme-btn {
  width: 14px;
  height: 14px;
  padding: 0;
  border: 1px solid var(--fg);
  border-radius: 0;
  cursor: pointer;
  flex: none;
  background: linear-gradient(90deg, var(--fg) 50%, var(--bg) 50%);
  transition: transform 0.35s var(--ease);
}

.theme-btn:hover {
  border-color: var(--accent);
  background: linear-gradient(90deg, var(--accent) 50%, var(--bg) 50%);
}

:root[data-theme="light"] .theme-btn {
  transform: rotate(180deg);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.6vw, 28px);
}

.nav a {
  position: relative;
  font-family: var(--mono);
  font-size: var(--t);
  color: var(--muted-soft);
  transition: color 0.2s;
}

.nav a:hover, .nav a.active {
  color: var(--fg);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav a:hover::after, .nav a.active::after {
  transform: scaleX(1);
}

.btn-portfolio {
  padding: 4px 10px;
  background: rgba(192, 132, 252, 0.12);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--mono);
  font-size: calc(11 * var(--u));
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.btn-portfolio:hover {
  background: var(--accent);
  color: #090514;
  transform: translateY(-1px);
}

/* 2. Hero Wordmark Section ——————————————————————————————————————————————— */
.hero {
  padding: calc(var(--hh) + 40px) var(--pad) 24px;
  border-bottom: 1px solid var(--line);
}

.hero-wordmark-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-wordmark {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(48px, 11vw, 150px);
  line-height: 0.9;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  color: var(--fg);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
}

.hero-wordmark .accent {
  color: var(--accent);
}

.hero-wordmark sup {
  font-size: 0.25em;
  font-weight: 400;
  color: var(--gold);
  letter-spacing: normal;
  border: 1px solid var(--gold);
  padding: 2px 8px;
  margin-left: 12px;
  vertical-align: middle;
}

.hero-desc {
  font-size: clamp(16px, 1.4vw, 22px);
  line-height: 1.45;
  color: var(--muted);
  max-width: 68ch;
}

.hero-stats-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(14px, 2.5vw, 36px);
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dotted var(--line);
  font-family: var(--mono);
  font-size: calc(11 * var(--u));
  color: var(--muted-soft);
}

.hero-stats-bar b {
  color: var(--fg);
  font-weight: 700;
}

/* 3. Featured Carousel Track (Selected Reels) ———————————————————————————— */
.feat-wrap {
  padding: 24px var(--pad) 56px;
  border-bottom: 1px solid var(--line);
}

.feat-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: var(--t);
  line-height: 1.35;
}

.feat-h {
  font-weight: 400;
  font-size: calc(14 * var(--u));
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fg);
}

.feat-h sup {
  font-size: 0.75em;
  color: var(--accent);
  margin-left: 4px;
}

.feat-ctl {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
}

.feat-btn {
  font-family: var(--mono);
  font-size: calc(13 * var(--u));
  color: var(--fg);
  padding: 3px 6px;
  transition: color 0.2s, transform 0.2s;
}

.feat-btn:hover {
  color: var(--accent);
  transform: scale(1.1);
}

.feat-btn:disabled {
  color: var(--muted);
  opacity: 0.3;
  cursor: default;
  transform: none;
}

.feat-pos {
  color: var(--muted);
  min-width: 58px;
  text-align: center;
  font-size: calc(11 * var(--u));
}

.feat-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(280px, 32vw, 420px);
  gap: clamp(16px, 2vw, 32px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 24px 4px 8px 0;
  scrollbar-width: none;
}

.feat-track::-webkit-scrollbar {
  display: none;
}

.card {
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--wash-card);
  border: 1px solid var(--line);
  padding: 14px;
  position: relative;
  transition: border-color 0.3s, transform 0.3s var(--ease);
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.card-media {
  position: relative;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.card-media video, .card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease);
}

.card:hover .card-media video,
.card:hover .card-media img {
  transform: scale(1.02);
}

.card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(9, 5, 20, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-family: var(--mono);
  font-size: calc(9 * var(--u));
  text-transform: uppercase;
  padding: 2px 6px;
  letter-spacing: 0.05em;
  z-index: 2;
}

.card-meta {
  font-family: var(--mono);
  font-size: calc(10 * var(--u));
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-meta b {
  color: var(--accent);
  font-weight: 700;
}

.card-meta i {
  font-style: normal;
  opacity: 0.5;
}

.card h3 {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(16px, 1.3vw, 20px);
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--fg);
}

.card p {
  font-size: calc(13 * var(--u));
  line-height: 1.45;
  color: var(--muted-soft);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-cta {
  font-family: var(--mono);
  font-size: calc(11 * var(--u));
  text-transform: uppercase;
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-top: 6px;
  margin-top: auto;
  border-top: 1px dotted var(--line);
  transition: color 0.2s, transform 0.2s;
}

.card:hover .card-cta {
  color: var(--accent);
  transform: translateX(4px);
}

/* 4. Editorial Spotlight ————————————————————————————————————————————————— */
.spotlight-wrap {
  padding: 48px var(--pad);
  border-bottom: 1px solid var(--line);
}

.mag-wide {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(24px, 3.5vw, 64px);
  align-items: center;
  background: var(--wash-card);
  border: 1px solid var(--line);
  padding: clamp(20px, 2.5vw, 40px);
}

.mag-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  position: relative;
  background: #000;
  border: 1px solid var(--line);
}

.mag-media video, .mag-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mag-txt {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mag-txt h2 {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(24px, 2.4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--fg);
}

.mag-txt p {
  font-size: clamp(14px, 1.1vw, 17px);
  line-height: 1.55;
  color: var(--muted);
}

.mag-metrics {
  display: flex;
  gap: 20px;
  padding: 12px 0;
  border-top: 1px dotted var(--line);
  border-bottom: 1px dotted var(--line);
  font-family: var(--mono);
  font-size: calc(11 * var(--u));
}

.mag-metrics span b {
  color: var(--accent);
  display: block;
  font-size: calc(16 * var(--u));
}

.btn-card {
  align-self: flex-start;
  padding: 8px 16px;
  background: var(--fg);
  color: var(--bg);
  font-family: var(--mono);
  font-size: calc(11 * var(--u));
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  border: 1px solid var(--fg);
  transition: all 0.25s var(--ease);
}

.btn-card:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #090514;
  transform: translateY(-2px);
}

/* 4.5. Thumbnail Portfolio Spotlight & Interactive Split-Slider Studio */
.thumb-spotlight-wrap {
  padding: 40px var(--pad);
  border-bottom: 1px solid var(--line);
}

.thumb-banner {
  background: var(--wash-card);
  border: 1px solid var(--line);
  padding: clamp(20px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.thumb-banner-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.thumb-badge {
  font-family: var(--mono);
  font-size: calc(10.5 * var(--u));
  letter-spacing: 0.05em;
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 4px 10px;
  background: rgba(242, 177, 52, 0.08);
}

.thumb-banner-content {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(24px, 3vw, 48px);
  align-items: center;
}

.thumb-banner-text {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.thumb-banner-text h2 {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(22px, 2.2vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--fg);
}

.thumb-banner-text p {
  font-size: clamp(14px, 1.1vw, 16px);
  line-height: 1.5;
  color: var(--muted);
}

.thumb-banner-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding-top: 12px;
  border-top: 1px dotted var(--line);
  font-family: var(--mono);
  font-size: calc(11 * var(--u));
  color: var(--muted-soft);
}

.thumb-banner-stats span b {
  color: var(--accent);
  display: block;
  font-size: calc(16 * var(--u));
}

.thumb-preview-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.thumb-duo-card {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  overflow: hidden;
  background: #000;
  transition: transform 0.3s var(--ease), border-color 0.3s;
}

.thumb-duo-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.thumb-duo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-pill-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(9, 5, 20, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-family: var(--mono);
  font-size: calc(9 * var(--u));
  padding: 2px 6px;
  letter-spacing: 0.05em;
  z-index: 2;
}

@media (max-width: 800px) {
  .thumb-banner-content {
    grid-template-columns: 1fr;
  }
}

/* 5. Directory Section (The Stash Complete Archive) —————————————————————— */
.dir {
  padding: 0 var(--pad) 120px;
}

.sec-bar {
  position: sticky;
  top: var(--hh);
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 95%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  font-size: var(--t);
  flex-wrap: wrap;
}

.sec-tools {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 36px);
  flex-wrap: wrap;
}

.filter-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-pills::-webkit-scrollbar {
  display: none;
}

.pill-btn {
  font-family: var(--mono);
  font-size: calc(10.5 * var(--u));
  padding: 4px 10px;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
  transition: all 0.2s;
}

.pill-btn:hover, .pill-btn.active {
  border-color: var(--accent);
  color: var(--fg);
  background: rgba(192, 132, 252, 0.1);
}

.pill-btn.active {
  background: var(--accent);
  color: #090514;
  font-weight: 700;
}

.view-toggle {
  display: flex;
  border: 1px solid var(--line);
}

.view-btn {
  font-family: var(--mono);
  font-size: calc(10.5 * var(--u));
  padding: 4px 8px;
  color: var(--muted);
  border: none;
}

.view-btn.active {
  background: var(--fg);
  color: var(--bg);
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  padding: 4px 10px;
  background: var(--wash);
  min-width: clamp(160px, 14vw, 260px);
}

.search-label {
  font-family: var(--mono);
  font-size: calc(10 * var(--u));
  color: var(--muted);
  text-transform: uppercase;
}

.search input {
  font-family: var(--mono);
  font-size: calc(11 * var(--u));
  border: 0;
  outline: 0;
  background: none;
  color: var(--fg);
  width: 100%;
}

.search input::placeholder {
  color: var(--muted);
}

/* Table List View */
.table {
  margin-top: 16px;
  font-size: var(--t);
  position: relative;
}

.thead, .row {
  display: grid;
  grid-template-columns: 50px minmax(160px, 1.2fr) minmax(130px, 0.9fr) minmax(0, 2.4fr) minmax(120px, 0.9fr) 48px;
  gap: 16px;
  align-items: center;
}

.thead {
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
  font-family: var(--mono);
  font-size: calc(10.5 * var(--u));
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.group-header {
  display: flex;
  align-items: center;
  padding: 28px 0 8px;
  border-bottom: 3px double var(--line);
  font-family: var(--mono);
  font-size: calc(12 * var(--u));
  text-transform: uppercase;
  color: var(--accent);
}

.group-header sup {
  color: var(--muted);
  margin-left: 6px;
}

.tr {
  position: relative;
  border-bottom: 1px dotted var(--line);
}

/* Stash signature row hover effect: black/colored bar expansion */
.row {
  width: 100%;
  padding: 11px 0 10px;
  text-align: left;
  cursor: pointer;
  position: relative;
  isolation: isolate;
  transition: color 0.2s;
}

.row::before {
  content: "";
  position: absolute;
  inset: -1px -8px;
  background: var(--fg);
  z-index: -1;
  clip-path: inset(50% 0 50% 0);
  transition: clip-path 0.35s var(--ease);
}

.row:hover::before, .row.active::before {
  clip-path: inset(0 0 0 0);
}

.row:hover, .row.active {
  color: var(--bg);
}

.row > span {
  transition: color 0.2s, transform 0.3s var(--ease);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row:hover > span:not(.c-x) {
  transform: translateX(8px);
}

.row:hover .c-n, .row:hover .c-cat, .row:hover .c-desc, .row:hover .c-dom {
  color: var(--bg);
}

.c-n, .c-dom {
  font-family: var(--mono);
  font-size: calc(11 * var(--u));
}

.row .c-n, .row .c-cat {
  color: var(--muted);
}

.c-name {
  font-weight: 600;
  color: var(--fg);
}

.c-desc {
  color: var(--muted-soft);
  font-size: calc(13 * var(--u));
}

.c-dom {
  color: var(--muted);
}

.c-x {
  font-family: var(--mono);
  text-align: right;
  color: var(--accent);
  font-weight: 700;
}

/* Hover thumbnail preview */
.c-shot-thumb {
  position: absolute;
  left: 60px;
  top: 50%;
  transform: translateY(-50%) scale(0.85);
  width: 140px;
  aspect-ratio: 9 / 16;
  border: 1px solid var(--accent);
  background: #000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, transform 0.2s var(--ease), visibility 0.2s;
  overflow: hidden;
}

.c-shot-thumb img, .c-shot-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tr:hover .c-shot-thumb {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) scale(1);
}

/* Grid View Mode */
.table.is-grid .thead {
  display: none;
}

.table.is-grid #rows {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.table.is-grid .group-header {
  grid-column: 1 / -1;
}

.table.is-grid .tr {
  border: 1px solid var(--line);
  background: var(--wash-card);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s, transform 0.2s;
}

.table.is-grid .tr:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.table.is-grid .row {
  display: flex;
  flex-direction: column;
  padding: 0;
  gap: 8px;
}

.table.is-grid .row::before {
  display: none;
}

.table.is-grid .row:hover {
  color: var(--fg);
}

.table.is-grid .row > span {
  transform: none !important;
  white-space: normal;
}

.table.is-grid .c-shot-thumb {
  position: static;
  opacity: 1;
  visibility: visible;
  transform: none;
  width: 100%;
  aspect-ratio: 9 / 16;
  margin-bottom: 6px;
  pointer-events: auto;
}

/* 6. Retro Mac OS Preview Window Modal (.d-win) —————————————————————————— */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(4, 2, 8, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 3vw, 40px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.d-win {
  width: min(920px, 100%);
  max-height: 90vh;
  background: var(--bg);
  border: 2px solid var(--fg);
  box-shadow: 8px 8px 0px rgba(0, 0, 0, 0.8), 0 20px 60px rgba(192, 132, 252, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.96);
  transition: transform 0.3s var(--ease);
}

.modal-overlay.open .d-win {
  transform: scale(1);
}

.d-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 28px;
  padding: 0 12px;
  border-bottom: 2px solid var(--fg);
  background: repeating-linear-gradient(to bottom, var(--fg) 0 1px, transparent 1px 3px) center/100% 16px no-repeat;
  user-select: none;
}

.d-bar-title {
  background: var(--bg);
  padding: 0 12px;
  font-family: var(--mono);
  font-size: calc(11 * var(--u));
  color: var(--fg);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.d-box-btn {
  width: 14px;
  height: 14px;
  border: 1px solid var(--fg);
  background: var(--bg);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 10px;
  line-height: 1;
  transition: background 0.2s, color 0.2s;
}

.d-box-btn:hover {
  background: var(--accent);
  color: #000;
}

.d-content {
  overflow-y: auto;
  padding: clamp(16px, 2.5vw, 32px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(18px, 2.5vw, 36px);
}

.d-media-frame {
  aspect-ratio: 9 / 16;
  background: #000;
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.d-media-frame video, .d-media-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.d-info {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-family: var(--mono);
}

.d-meta-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: calc(10.5 * var(--u));
  color: var(--muted);
  border-bottom: 1px dotted var(--line);
  padding-bottom: 6px;
}

.d-meta-row b {
  color: var(--accent);
}

.d-title {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.2;
  color: var(--fg);
}

.d-desc {
  font-family: var(--sans);
  font-size: calc(13.5 * var(--u));
  line-height: 1.5;
  color: var(--muted-soft);
}

.d-specs-table {
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: calc(11 * var(--u));
}

.d-spec-line {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  border-bottom: 1px dotted var(--line);
  padding-bottom: 6px;
}

.d-spec-line dt {
  color: var(--muted);
  text-transform: uppercase;
}

.d-spec-line dd {
  color: var(--fg);
}

.d-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

/* 7. Footer ————————————————————————————————————————————————————————————— */
.site-foot {
  padding: 48px var(--pad) 72px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  font-family: var(--mono);
  font-size: var(--t);
  color: var(--muted);
}

.foot-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.foot-left b {
  color: var(--fg);
}

.foot-links {
  display: flex;
  gap: 20px;
}

.foot-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* Responsive Styles */
@media (max-width: 900px) {
  .thead, .row {
    grid-template-columns: 44px minmax(130px, 1fr) minmax(100px, 0.8fr) 36px;
  }
  .c-desc, .c-dom {
    display: none;
  }
  .mag-wide {
    grid-template-columns: 1fr;
  }
  .d-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-head {
    height: auto;
    min-height: 48px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 8px var(--pad);
  }
  .brand-wrap {
    order: 1;
  }
  .head-actions {
    order: 2;
  }
  .site-head .nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    gap: 14px;
    padding: 6px 0 2px 0;
  }
  .site-head .nav::-webkit-scrollbar {
    display: none;
  }
  .site-subtitle, .h-status {
    display: none;
  }
  .thead, .row {
    grid-template-columns: 36px 1fr 30px;
  }
  .c-cat {
    display: none;
  }
  .hero-wordmark {
    font-size: clamp(26px, 7vw, 42px);
  }
}

