/* MB MEDIA — Built for MOHAMAD BASSEM MEFTAH — mftahbassem@gmail.com */

:root {
  --bg: #0a0908;
  --paper: #161412;
  --ink: #f4f1ec;
  --soft: #c9c2b4;
  --muted: #8a8275;
  --primary: #c9a34e;
  --secondary: #8f8060;
  --gold: #d9b968;
  --transparent: transparent;
  --line: color-mix(in srgb, var(--ink) 20%, var(--transparent));
  --line-soft: color-mix(in srgb, var(--ink) 54%, var(--transparent));
  --ink-78: color-mix(in srgb, var(--ink) 78%, var(--transparent));
  --primary-32: color-mix(in srgb, var(--primary) 32%, var(--transparent));
  --primary-18: color-mix(in srgb, var(--primary) 18%, var(--transparent));
  --primary-line: color-mix(in srgb, var(--primary) 42%, var(--transparent));
  --black-62: color-mix(in srgb, #000 62%, var(--transparent));
  --black-52: color-mix(in srgb, #000 52%, var(--transparent));
  --black-35: color-mix(in srgb, #000 35%, var(--transparent));
  --black-22: color-mix(in srgb, #000 22%, var(--transparent));
  --white-55: color-mix(in srgb, #fff 55%, var(--transparent));
  --white-42: color-mix(in srgb, #fff 42%, var(--transparent));
  --white-34: color-mix(in srgb, #fff 34%, var(--transparent));
  --white-25: color-mix(in srgb, #fff 25%, var(--transparent));
  --white-12: color-mix(in srgb, #fff 12%, var(--transparent));
  --player-bg: color-mix(in srgb, var(--paper) 88%, var(--primary) 12%);
  --player-hover: color-mix(in srgb, var(--paper) 78%, var(--primary) 22%);
  --player-glass: color-mix(in srgb, var(--paper) 82%, var(--transparent));
  --player-panel: color-mix(in srgb, var(--paper) 92%, var(--primary) 8%);
  --player-border: color-mix(in srgb, var(--primary) 22%, #fff);
  --player-shadow: color-mix(in srgb, var(--primary) 18%, #000 82%);
  --player-text: color-mix(in srgb, var(--ink) 82%, var(--transparent));
  --player-soft: color-mix(in srgb, var(--primary) 72%, var(--transparent));
  --serif: var(--font-display);
  --soft-serif: var(--font-soft);
  --sans: var(--font-body);
  --script: var(--font-script);
}

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

/* Language-specific fonts */
:root {
  --font-display: 'Playfair Display', serif;
  --font-body: 'Nunito', sans-serif;
  --font-soft: 'Cormorant Garamond', serif;
  --font-script: 'Dancing Script', cursive;
}
[lang="ar"] {
  --font-display: 'Cairo', sans-serif;
  --font-body: 'Tajawal', sans-serif;
  --font-soft: 'Tajawal', sans-serif;
  --font-script: 'Cairo', sans-serif;
}

/* Arabic typography adjustments */
[lang="ar"] .page-panel h1 { line-height: 1.3; letter-spacing: 1px; }
[lang="ar"] .page-panel .panel-subtitle { letter-spacing: 2px; }
[lang="ar"] .body-text { line-height: 2; }
[lang="ar"] .bio-card .bio-text { line-height: 1.5; }
[lang="ar"] .identity-name .sig-name { line-height: 1.1; }
[lang="ar"] .identity-meta .meta-row .meta-val { line-height: 1.5; }
[lang="ar"] .skill-card h3,
[lang="ar"] .text-card h3 { line-height: 1.3; }
[lang="ar"] .skill-card p,
[lang="ar"] .text-card p { line-height: 2; }
[lang="ar"] .insight-list p { line-height: 1.7; }
[lang="ar"] .style-card p,
[lang="ar"] .style-note p { line-height: 2; }
[lang="ar"] .mood-card p { line-height: 1.5; }
[lang="ar"] .testimonial-info h3 { line-height: 1.3; }
[lang="ar"] .testi-text { line-height: 2; }
[lang="ar"] .gauge-item .gauge-label { letter-spacing: 1px; }
[lang="ar"] .gallery-card .gallery-desc { line-height: 1.4; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* ===== PROFILE CARD CONTAINER ===== */
.profile-card {
  width: 960px;
  height: 740px;
  margin: 20px auto;
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background:
    radial-gradient(circle at 82% 80%, var(--primary-32), var(--transparent) 32%),
    radial-gradient(circle at 52% 78%, var(--primary-32), var(--transparent) 26%),
    linear-gradient(135deg, var(--paper), var(--bg));
  border: 1px solid var(--line-soft);
  box-shadow: 0 28px 90px var(--black-62);
  font-family: var(--sans);
  color: var(--ink);
}
.profile-card::after {
  content: '';
  position: absolute;
  inset: 14px;
  border: 1px solid var(--white-55);
  border-radius: 14px;
  pointer-events: none;
  z-index: 60;
}

/* ===== PORTRAIT PANEL (left side) ===== */
.portrait-panel {
  position: absolute;
  left: 0;
  top: 0;
  width: 400px;
  height: 100%;
  background: #111;
  overflow: hidden;
  z-index: 1;
}
.portrait-frame {
  position: absolute;
  inset: 0;
}
.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.12) brightness(0.78) saturate(0.92);
  transition: .8s ease;
}
.portrait-panel:hover .portrait-frame img {
  transform: scale(1.04);
  filter: contrast(1.18) brightness(0.86) saturate(1);
}
.portrait-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--black-62), var(--transparent) 55%),
    linear-gradient(to bottom, var(--transparent) 55%, var(--black-52));
  z-index: 2;
}
.panel-emblem {
  position: absolute;
  left: 31px;
  top: 36px;
  z-index: 8;
  color: var(--gold);
  font-size: 30px;
  transition: .45s ease;
}
.portrait-panel:hover .panel-emblem {
  transform: rotate(45deg) scale(1.12);
  color: var(--paper);
}
.panel-tagline {
  position: absolute;
  left: 32px;
  top: 110px;
  z-index: 8;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font: 900 9px var(--sans);
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gold);
}
.panel-credit {
  position: absolute;
  left: 34px;
  bottom: 35px;
  z-index: 8;
}
.panel-credit .panel-label {
  display: block;
  font: italic 52px/0.76 var(--soft-serif);
  color: var(--primary);
  text-shadow:
    0 0 18px var(--black-35),
    1px 1px 0 var(--gold),
    -1px 0 0 var(--paper);
  transition: .45s ease;
}
.panel-credit:hover .panel-label {
  letter-spacing: 1px;
  color: var(--gold);
}
.panel-credit .panel-sub {
  display: block;
  margin-top: 12px;
  font: 900 9px var(--sans);
  letter-spacing: 5px;
  color: var(--paper);
  text-transform: uppercase;
}

/* ===== DECORATIVE ELEMENTS ===== */
.flourish-one,
.flourish-two {
  position: absolute;
  pointer-events: none;
  object-fit: cover;
  z-index: 7;
  opacity: 0.15;
  mix-blend-mode: difference;
  filter: grayscale(0.35) contrast(1.15) sepia(0.25);
}
.flourish-one {
  left: 20px;
  bottom: 58px;
  width: 165px;
  height: 210px;
}
.flourish-two {
  right: 90px;
  bottom: 0;
  width: 255px;
  height: 320px;
  opacity: 0.08;
}

/* ===== HERO ACCENT BAR ===== */
.hero-accent {
  position: absolute;
  left: 382px;
  top: 0;
  width: 14px;
  height: 100%;
  z-index: 6;
  background: linear-gradient(180deg, var(--primary), var(--secondary), var(--primary));
  background-size: 100% 260%;
  opacity: .24;
  mix-blend-mode: multiply;
  animation: accentFlow 8s ease-in-out infinite;
}
@keyframes accentFlow {
  0%, 100% { background-position: 0 0; }
  50% { background-position: 0 100%; }
}

/* ===== HERO NAME (big vertical — decorative watermark, same font/position/size in all 3 languages) ===== */
.hero-name {
  position: absolute;
  left: 290px;
  top: 24px;
  width: 150px;
  height: 684px;
  z-index: 8;
  pointer-events: none;
  overflow: hidden;
  direction: ltr;
  unicode-bidi: isolate;
}
.hero-name span {
  display: block;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  direction: ltr;
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 60px;
  line-height: 0.82;
  letter-spacing: -4px;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1.35px var(--white-55);
  text-shadow: 0 0 12px var(--black-22);
}

/* ===== PAGE INDEX NUMBER ===== */
.page-index {
  position: absolute;
  right: 94px;
  top: 0;
  font: 900 96px/1 var(--serif);
  color: color-mix(in srgb, var(--ink) 8%, var(--transparent));
  z-index: 2;
  transition: .45s ease;
}

/* ===== CONTENT AREA ===== */
.tab-content {
  position: absolute;
  left: 430px;
  right: 92px;
  top: 32px;
  bottom: 24px;
  z-index: 15;
}

/* ===== TOP BAR (player + quote) ===== */
.top-bar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 185px;
  align-items: center;
  gap: 10px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--primary-line);
}
.tagline-quote {
  max-width: 90px;
  font: 700 14px/1.05 var(--soft-serif);
  color: var(--primary);
  text-align: right;
  font-style: italic;
}

/* ===== MUSIC PLAYER ===== */
.player {
  position: relative;
  width: 90%;
  min-height: 54px;
  z-index: 45;
  display: grid;
  grid-template-columns: 34px 1fr 30px;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--player-border);
  border-radius: 999px;
  background:
    linear-gradient(135deg, var(--white-34), var(--primary-18)),
    var(--player-glass);
  backdrop-filter: blur(18px);
  color: var(--player-text);
  box-shadow:
    0 12px 28px var(--black-22),
    inset 0 0 0 1px var(--white-12);
  transition: .35s ease;
}
.player:hover,
.player.playing {
  border-color: var(--primary-line);
  background:
    linear-gradient(135deg, var(--white-42), var(--primary-32)),
    var(--player-hover);
  transform: translateY(-2px);
  box-shadow:
    0 18px 38px var(--player-shadow),
    inset 0 0 0 1px var(--white-55);
}
.play-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--white-55);
  background: var(--primary);
  color: var(--paper);
  cursor: pointer;
  font-size: 12px;
  box-shadow: 0 0 14px var(--primary-32);
  transition: .35s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.play-btn:hover {
  background: var(--gold);
  color: var(--ink);
  transform: scale(1.06);
}
.player-info {
  overflow: hidden;
  min-width: 0;
}
.player-info .track-label {
  display: block;
  font: 900 7px var(--sans);
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: .72;
  color: var(--player-soft);
}
.player-info .track-name {
  display: block;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font: italic 15px/1 var(--soft-serif);
  color: var(--player-text);
}
.wave-bars {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 11px;
  margin-top: 5px;
  opacity: .65;
}
.wave-bars i {
  display: block;
  width: 2px;
  height: 5px;
  background: var(--primary);
  border-radius: 4px;
  animation: pulseBar 1.1s ease-in-out infinite;
  animation-play-state: paused;
}
.player.playing .wave-bars i {
  animation-play-state: running;
}
.wave-bars i:nth-child(2) { animation-delay: .14s; height: 9px; }
.wave-bars i:nth-child(3) { animation-delay: .28s; height: 6px; }
.wave-bars i:nth-child(4) { animation-delay: .42s; height: 10px; }
.wave-bars i:nth-child(5) { animation-delay: .56s; height: 7px; }
@keyframes pulseBar {
  0%, 100% { transform: scaleY(0.45); opacity: .42; }
  50% { transform: scaleY(1); opacity: 1; }
}

.vol-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--white-25);
  background: color-mix(in srgb, var(--gold) 75%, var(--paper));
  color: var(--ink);
  cursor: pointer;
  font: 900 7px var(--sans);
  letter-spacing: 1px;
  transition: .35s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vol-btn:hover {
  background: var(--primary);
  color: var(--paper);
  transform: scale(1.06);
}
.vol-panel {
  position: absolute;
  right: 8px;
  top: calc(100% + 8px);
  width: 170px;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--player-panel);
  border: 1px solid var(--player-border);
  backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: .3s ease;
  box-shadow: 0 12px 26px var(--black-22);
}
.player.vol-open .vol-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.vol-panel input {
  width: 100%;
  height: 4px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* ===== PAGE PANELS (tab content) ===== */
.page-panel {
  display: none;
  position: absolute;
  inset: 98px 0 0 0;
  flex-direction: column;
  animation: tabFade .55s ease;
}
.page-panel.active {
  display: flex;
}
@keyframes tabFade {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-panel h1 {
  margin: 0;
  font: 900 38px/1 var(--serif);
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--primary);
}
.page-panel .panel-subtitle {
  margin: 6px 0 22px;
  font: 900 10px var(--sans);
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--muted);
}
.page-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 22px;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--white-25);
}
.page-scroll::-webkit-scrollbar { width: 6px; }
.page-scroll::-webkit-scrollbar-track { background: var(--white-25); border-radius: 999px; }
.page-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--primary), var(--secondary));
  border-radius: 999px;
  border: 1px solid var(--line-soft);
}
.page-scroll::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(var(--gold), var(--primary));
}

/* ===== IDENTITY SECTION ===== */
.identity-grid {
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  gap: 18px;
  margin: 0 0 18px;
  padding: 17px 0 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.identity-name {
  position: relative;
  padding: 8px 0 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.identity-name .field-label {
  display: block;
  font: 900 8px var(--sans);
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 50px;
}
.identity-name .sig-name {
  position: relative;
  z-index: 2;
  display: block;
  font-family: var(--script);
  font-size: 62px;
  line-height: .72;
  font-weight: 700;
  color: color-mix(in srgb, var(--ink) 88%, var(--primary));
  text-shadow:
    0 2px 0 var(--paper),
    0 10px 22px var(--primary-18);
  transform: rotate(-3deg);
  transition: .45s ease;
}
.identity-name .sig-name:hover {
  transform: rotate(-4deg) translateY(-2px) scale(1.01);
  color: var(--primary);
}
.identity-meta {
  display: grid;
  gap: 6px;
}
.identity-meta .meta-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 5px;
  margin: 0;
}
.identity-meta .meta-row:hover {
  border-color: var(--primary-line);
}
.identity-meta .meta-row .meta-key {
  font: 900 8px var(--sans);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--soft);
}
.identity-meta .meta-row .meta-val {
  font: 600 13px var(--soft-serif);
  color: var(--ink);
  text-align: right;
}

/* ===== BIO CARD ===== */
.bio-card {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-left: 3px solid var(--primary);
  background:
    linear-gradient(90deg, var(--primary-18), var(--transparent)),
    var(--white-25);
  backdrop-filter: blur(10px);
}
.bio-card .bio-heading {
  display: block;
  margin-bottom: 7px;
  font: 900 8px var(--sans);
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--primary);
}
.bio-card .bio-text {
  margin: 0;
  font: italic 18px/1.25 var(--soft-serif);
  color: var(--soft);
}

/* ===== BODY TEXT ===== */
.body-text {
  font: 400 14px/1.8 var(--sans);
  text-align: justify;
  color: var(--ink-78);
}
.body-text strong {
  color: var(--primary);
}

/* ===== SKILL CARDS (Persona features) ===== */
.skill-card {
  display: grid;
  grid-template-columns: 145px 1fr;
  gap: 16px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, var(--white-34), var(--white-12)),
    var(--white-25);
  backdrop-filter: blur(10px);
  transition: .4s ease;
}
.skill-card:hover {
  border-color: var(--primary-line);
  transform: translateY(-3px);
}
.skill-card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border: 1px solid var(--line-soft);
  filter: contrast(1.08) saturate(0.82);
  transition: .45s ease;
}
.skill-card:hover img {
  filter: contrast(1.14) saturate(1);
  transform: scale(1.03);
}
.skill-card .skill-heading,
.text-card .skill-heading,
.insight-list .skill-heading {
  display: block;
  margin-bottom: 7px;
  font: 900 8px var(--sans);
  letter-spacing: 2.6px;
  text-transform: uppercase;
  color: var(--primary);
}
.skill-card h3,
.text-card h3 {
  margin: 0 0 8px;
  font: italic 25px/0.95 var(--soft-serif);
  color: var(--ink);
}
.skill-card p,
.text-card p {
  margin: 0;
  font: 400 13px/1.7 var(--sans);
  text-align: justify;
  color: var(--ink-78);
}

/* ===== TEXT CARD ROW (Persona alternating) ===== */
.text-card-row {
  display: grid;
  grid-template-columns: 1fr 118px;
  gap: 13px;
  min-height: 132px;
  margin-bottom: 14px;
}
.text-card-row.reverse {
  grid-template-columns: 118px 1fr;
}
.text-card-row.reverse img {
  grid-column: 1;
  grid-row: 1;
}
.text-card-row.reverse .text-card {
  grid-column: 2;
  grid-row: 1;
}
.text-card-row img {
  width: 100%;
  height: 132px;
  object-fit: cover;
  border: 1px solid var(--line-soft);
  filter: contrast(1.08) saturate(0.82);
  transition: .45s ease;
}
.text-card-row:hover img {
  filter: contrast(1.14) saturate(1);
  transform: scale(1.03);
}
.text-card {
  padding: 13px 15px;
  border-left: 3px solid var(--primary);
  background:
    linear-gradient(90deg, var(--primary-18), var(--transparent)),
    var(--white-25);
  backdrop-filter: blur(10px);
  transition: .35s ease;
}
.text-card:hover {
  background:
    linear-gradient(90deg, var(--primary-18), var(--white-25)),
    var(--white-34);
  transform: translateX(3px);
}

/* ===== METER GAUGES ===== */
.gauge-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  margin: 4px 0 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.gauge-item .gauge-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font: 900 8px var(--sans);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--soft);
}
.gauge-item .gauge-track {
  height: 8px;
  border: 1px solid var(--line);
  background: var(--white-25);
  overflow: hidden;
}
.gauge-item .gauge-fill {
  display: block;
  width: var(--level);
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: .5s ease;
}
.gauge-item:hover .gauge-fill {
  width: 100%;
}

/* ===== INSIGHT LIST (notes) ===== */
.insight-list {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}
.insight-list .insight-item {
  padding: 12px 14px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, var(--white-34), var(--white-12)),
    var(--white-25);
  backdrop-filter: blur(10px);
  transition: .35s ease;
}
.insight-list .insight-item:hover {
  border-color: var(--primary-line);
  transform: translateY(-2px);
}
.insight-list p {
  margin: 0;
  font: 600 14px/1.35 var(--soft-serif);
  color: var(--ink);
}

/* ===== SWATCH GRID (palette) ===== */
.swatch-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.swatch {
  min-height: 78px;
  border: 1px solid var(--line);
  background: var(--white-25);
  backdrop-filter: blur(10px);
  padding: 8px;
  transition: .35s ease;
}
.swatch:hover {
  transform: translateY(-3px);
  border-color: var(--primary-line);
  background: var(--white-34);
}
.swatch .swatch-color {
  display: block;
  height: 28px;
  margin-bottom: 8px;
  background: var(--swatch);
  border: 1px solid var(--line-soft);
}
.swatch .swatch-name {
  display: block;
  font: 900 7px var(--sans);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--primary);
}
.swatch .swatch-hex {
  display: block;
  margin-top: 4px;
  font: 600 12px var(--soft-serif);
  color: var(--ink);
}

/* ===== GALLERY GRID (lookbook) ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  grid-template-rows: repeat(2, 145px);
  gap: 10px;
  margin-bottom: 16px;
}
.gallery-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--white-25);
  transition: .4s ease;
}
.gallery-card.tall {
  grid-row: span 2;
}
.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.08) brightness(0.82) saturate(0.86);
  transition: .55s ease;
}
.gallery-card:hover {
  border-color: var(--primary-line);
  transform: translateY(-3px);
}
.gallery-card:hover img {
  transform: scale(1.06);
  filter: contrast(1.15) brightness(0.9) saturate(1);
}
.gallery-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, var(--black-52), var(--transparent) 62%),
    linear-gradient(90deg, var(--black-35), var(--transparent));
  pointer-events: none;
}
.gallery-card .gallery-tag,
.gallery-card .gallery-desc {
  position: absolute;
  left: 12px;
  right: 12px;
  z-index: 2;
}
.gallery-card .gallery-tag {
  bottom: 39px;
  font: 900 8px var(--sans);
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--gold);
}
.gallery-card .gallery-desc {
  bottom: 12px;
  font: 500 13px/1.15 var(--soft-serif);
  color: var(--paper);
}

/* ===== STYLE CARD (appearance blocks) ===== */
.style-card {
  margin-bottom: 14px;
  padding: 15px 17px;
  border-left: 3px solid var(--primary);
  background:
    linear-gradient(90deg, var(--primary-18), var(--transparent)),
    var(--white-25);
  backdrop-filter: blur(10px);
}
.style-card .style-heading,
.style-note .style-heading {
  display: block;
  margin-bottom: 8px;
  font: 900 8px var(--sans);
  letter-spacing: 2.6px;
  text-transform: uppercase;
  color: var(--primary);
}
.style-card p,
.style-note p {
  margin: 0;
  font: 400 13px/1.75 var(--sans);
  text-align: justify;
  color: var(--ink-78);
}

/* ===== STYLE SECTIONS ===== */
.style-sections {
  display: grid;
  gap: 18px;
  margin-bottom: 20px;
}
.style-section {
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, var(--white-34), var(--white-12)),
    var(--white-25);
  padding: 13px;
  backdrop-filter: blur(10px);
}
.style-section-head {
  margin-bottom: 12px;
}
.style-section-head .section-name {
  display: block;
  margin-bottom: 4px;
  font: 900 8px var(--sans);
  letter-spacing: 2.6px;
  text-transform: uppercase;
  color: var(--primary);
}
.style-section-head .section-desc {
  font: italic 14px var(--soft-serif);
  color: var(--soft);
}

/* ===== MOOD GRID ===== */
.mood-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.mood-card {
  transition: .35s ease;
}
.mood-card:hover {
  transform: translateY(-3px);
}
.mood-card img {
  width: 100%;
  height: 165px;
  object-fit: cover;
  margin-bottom: 8px;
  border: 1px solid var(--line-soft);
  filter: contrast(1.08) brightness(0.9) saturate(0.85);
  transition: .45s ease;
}
.mood-card:hover img {
  transform: scale(1.03);
  filter: contrast(1.14) brightness(0.96) saturate(1);
}
.mood-card p {
  margin: 0;
  font: 500 13px/1.35 var(--soft-serif);
  color: var(--ink);
}

/* ===== TESTIMONIAL CARDS (collaborations) ===== */
.testimonial-stack {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
}
.testimonial-card {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 14px;
  min-height: 190px;
  padding: 12px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, var(--white-34), var(--white-12)),
    var(--white-25);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  transition: .4s ease;
}
.testimonial-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(var(--primary), var(--secondary));
}
.testimonial-card:hover {
  border-color: var(--primary-line);
  transform: translateY(-3px);
  background:
    linear-gradient(135deg, var(--primary-18), var(--white-25)),
    var(--white-34);
}
.testimonial-card img {
  width: 118px;
  height: 166px;
  object-fit: cover;
  border: 1px solid var(--line-soft);
  filter: contrast(1.08) brightness(0.9) saturate(0.85);
  transition: .45s ease;
}
.testimonial-card:hover img {
  transform: scale(1.04);
  filter: contrast(1.14) brightness(0.96) saturate(1);
}
.testimonial-info {
  min-width: 0;
}
.testimonial-info .testi-label {
  display: block;
  margin-bottom: 4px;
  font: 900 8px var(--sans);
  letter-spacing: 2.6px;
  text-transform: uppercase;
  color: var(--primary);
}
.testimonial-info h3 {
  margin: 0;
  font: italic 28px/0.95 var(--soft-serif);
  color: var(--ink);
}
.testimonial-info blockquote {
  margin: 8px 0 10px;
  padding: 0 0 0 11px;
  border-left: 2px solid var(--primary);
  font: italic 15px/1.15 var(--soft-serif);
  color: var(--soft);
}
.testi-text {
  font: 400 13px/1.65 var(--sans);
  text-align: justify;
  color: var(--ink-78);
}
.testi-text p { margin: 0 0 8px; }

/* ===== TAB NAVIGATION ===== */
.tab-nav {
  position: absolute;
  right: 18px;
  top: 74px;
  bottom: 54px;
  width: 58px;
  z-index: 40;
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  border-left: 1px solid var(--line);
}
.tab-nav button {
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--transparent);
  color: var(--ink);
  cursor: pointer;
  position: relative;
  transition: .35s ease;
  padding: 0;
  overflow: hidden;
}
.tab-nav button:last-child {
  border-bottom: 0;
}
.tab-nav button .tab-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(180deg);
  writing-mode: vertical-rl;
  font-family: var(--serif);
  font-weight: 800;
  font-size: 13px;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: .35s ease;
  white-space: nowrap;
}
.tab-nav button::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 4px;
  height: 0;
  transform: translateY(-50%);
  background: var(--primary);
  border-radius: 4px;
  transition: .35s ease;
}
.tab-nav button.active::before,
.tab-nav button:hover::before {
  height: 72px;
}
.tab-nav button.active,
.tab-nav button:hover {
  background: var(--white-25);
}
.tab-nav button.active .tab-label,
.tab-nav button:hover .tab-label {
  color: var(--primary);
  letter-spacing: 3px;
}

/* ===== RESPONSIVE — MOBILE ===== */
@media (max-width: 768px) {
  body { padding: 0; margin: 0; }

  .profile-card {
    width: 100%;
    height: auto;
    min-height: 100svh;
    margin: 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
    display: flex;
    flex-direction: column;
  }
  .profile-card::after { display: none; }

  .portrait-panel {
    position: relative;
    width: 100%;
    height: 40svh;
    left: auto;
    top: auto;
    min-height: 280px;
  }
  .portrait-frame::after {
    background:
      linear-gradient(to top, var(--black-62), var(--transparent) 50%);
  }
  .panel-tagline { left: 16px; top: 80px; }
  .panel-emblem { left: 16px; top: 24px; font-size: 24px; }
  .panel-credit { left: 18px; bottom: 20px; }
  .panel-credit .panel-label { font-size: 38px; }
  .panel-credit .panel-sub { font-size: 8px; letter-spacing: 3px; margin-top: 8px; }

  .flourish-one,
  .flourish-two { display: none; }

  .hero-accent { display: none; }
  .hero-name { display: none; }

  .page-index {
    position: absolute;
    right: 16px;
    top: -40px;
    font-size: 64px;
    opacity: .06;
  }

  .tab-content {
    position: relative;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    padding: 16px;
    flex: 1;
  }

  .top-bar {
    grid-template-columns: 1fr;
    gap: 8px;
    padding-bottom: 12px;
  }
  .player { width: 100%; }
  .tagline-quote { max-width: 100%; text-align: left; }

  .page-panel {
    position: relative;
    inset: 0;
    animation: tabFade .55s ease;
  }
  .page-scroll {
    height: auto;
    max-height: calc(100svh - 280px - 120px);
    padding-right: 8px;
  }
  .page-panel h1 { font-size: 28px; letter-spacing: 2px; }

  .identity-grid { grid-template-columns: 1fr; gap: 12px; }
  .identity-name .field-label { margin-bottom: 20px; }
  .identity-name .sig-name { font-size: 42px; }

  .skill-card { grid-template-columns: 1fr; }
  .skill-card img { height: 120px; }
  .text-card-row,
  .text-card-row.reverse {
    grid-template-columns: 1fr;
  }
  .text-card-row.reverse img { grid-column: 1; grid-row: auto; }
  .text-card-row.reverse .text-card { grid-column: 1; grid-row: auto; }
  .text-card-row img { height: 100px; }

  .gauge-group { grid-template-columns: 1fr; }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
  .gallery-card.tall { grid-row: span 1; }
  .gallery-card { min-height: 120px; }

  .swatch-grid { grid-template-columns: repeat(2, 1fr); }

  .mood-grid { grid-template-columns: repeat(2, 1fr); }
  .mood-card img { height: 120px; }

  .testimonial-card { grid-template-columns: 1fr; }
  .testimonial-card img {
    width: 100%;
    height: 180px;
  }

  .tab-nav {
    position: relative;
    right: auto;
    top: auto;
    bottom: auto;
    width: 100%;
    display: grid;
    grid-template-rows: none;
    grid-template-columns: repeat(4, 1fr);
    border-left: none;
    border-top: 1px solid var(--line);
    background: var(--paper);
    z-index: 50;
  }
  .tab-nav button {
    border-bottom: 0;
    border-right: 1px solid var(--line);
    padding: 10px 0;
  }
  .tab-nav button:last-child { border-right: 0; }
  .tab-nav button .tab-label {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    writing-mode: horizontal-tb;
    font-size: 11px;
    letter-spacing: 1px;
    display: block;
    padding: 0 4px;
  }
  .tab-nav button::before { display: none; }
  .tab-nav button.active { background: var(--white-25); }
  .tab-nav button.active .tab-label { color: var(--primary); }
}

@media (max-width: 390px) {
  .page-panel h1 { font-size: 22px; }
  .panel-credit .panel-label { font-size: 30px; }
  .mood-grid { grid-template-columns: 1fr 1fr; }
  .mood-card img { height: 100px; }
  .gallery-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .gallery-card { min-height: 100px; }
}
