/* ======== RESET & ROOT ======== */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { overflow-x: hidden; max-width: 100vw; }

:root {
  --bg: #e9e1d6;
  --surface: rgba(255, 252, 247, 0.24);
  --surface-strong: rgba(255, 251, 245, 0.34);
  --line: rgba(55, 40, 26, 0.14);
  --text: #1b1611;
  --muted: #36281e;
  --accent: #c25a21;
  --shadow: 0 24px 60px rgba(35, 25, 16, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --sidebar-width: 272px;
  --page-image: none;
  --font: Georgia, "Times New Roman", serif;
  --font-mono: "SF Mono", "Fira Code", "Courier New", monospace;
  /* punk additions */
  --gold: #b8943e;
  --punk-cyan: #2fc9c2;
  --punk-red: #d63a3a;
}

html { scroll-behavior: smooth; }

body {
  position: relative;
  isolation: isolate;
  margin: 0;
  color: var(--text);
  background: transparent;
  font-family: var(--font);
  overflow-x: hidden;
  line-height: 1.65;
  font-weight: 500;
}

.site-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: var(--page-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.03);
  filter: saturate(1.04) contrast(1.02);
  pointer-events: none;
}

.site-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(245, 238, 229, 0.06), rgba(232, 223, 212, 0.12));
}

/* Background image + light overlays on ::before */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  background-image:
    radial-gradient(circle at top left, rgba(255, 218, 191, 0.2), transparent 26%),
    radial-gradient(circle at 82% 18%, rgba(214, 189, 149, 0.14), transparent 24%);
  background-size: auto, auto;
  background-position: top left, top right;
  background-repeat: no-repeat;
}

/* Light gradient overlay on ::after */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.03), transparent 42%),
    linear-gradient(225deg, rgba(255, 255, 255, 0.01), transparent 38%);
  pointer-events: none;
}

/* ======== SCANLINES (on separate div) ======== */
.scanlines {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(27, 22, 17, 0.03) 2px,
    rgba(27, 22, 17, 0.03) 4px
  );
  pointer-events: none;
  z-index: 9990;
  mix-blend-mode: multiply;
}

/* ======== NOISE ======== */
.noise {
  position: fixed; inset: 0;
  z-index: 9989;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px;
}

/* ======== PARTICLES ======== */
.particles {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.particles span {
  position: absolute;
  width: 3px; height: 3px;
  border-radius: 50%;
  opacity: 0;
  animation: floatUp linear infinite;
}
.particles span:nth-child(odd) { background: var(--accent); }
.particles span:nth-child(even) { background: var(--punk-cyan); }
.particles span:nth-child(3n) { background: var(--gold); width: 2px; height: 2px; }
@keyframes floatUp {
  0%   { opacity: 0; transform: translateY(0) scale(0.5); }
  15%  { opacity: 0.5; }
  85%  { opacity: 0.08; }
  100% { opacity: 0; transform: translateY(-100vh) scale(1); }
}

/* ======== DATA RAIN ======== */
#dataRain {
  position: fixed; inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.06;
}

/* ======== GLITCH TEXT ======== */
.glitch {
  position: relative;
  display: inline-block;
}
.glitch::before, .glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  overflow: hidden;
  background: transparent;
}
.glitch::before {
  animation: glitch-top 3s infinite linear alternate-reverse;
  clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
  -webkit-text-fill-color: var(--punk-red);
  opacity: 0.8;
}
.glitch::after {
  animation: glitch-bottom 2.5s infinite linear alternate-reverse;
  clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%);
  -webkit-text-fill-color: var(--punk-cyan);
  opacity: 0.7;
}
@keyframes glitch-top {
  0%,100% { transform: translate(0); }
  10% { transform: translate(-4px, -2px); }
  30% { transform: translate(4px, 1px); }
  50% { transform: translate(-2px, 3px); }
  70% { transform: translate(3px, -2px); }
  90% { transform: translate(-1px, 1px); }
}
@keyframes glitch-bottom {
  0%,100% { transform: translate(0); }
  15% { transform: translate(3px, 2px); }
  35% { transform: translate(-3px, -1px); }
  55% { transform: translate(2px, -3px); }
  75% { transform: translate(-4px, 2px); }
}

/* ======== ORNAMENTAL CORNERS (reusable) ======== */
.ornament-frame {
  position: relative;
}
.ornament-frame::before,
.ornament-frame::after {
  content: '';
  position: absolute;
  width: 24px; height: 24px;
  border-color: var(--gold);
  border-style: solid;
  opacity: 0.5;
  z-index: 2;
  transition: opacity 0.4s, border-color 0.4s;
}
.ornament-frame::before {
  top: -1px; left: -1px;
  border-width: 2px 0 0 2px;
}
.ornament-frame::after {
  bottom: -1px; right: -1px;
  border-width: 0 2px 2px 0;
}
.ornament-frame:hover::before,
.ornament-frame:hover::after {
  opacity: 1;
  border-color: var(--punk-cyan);
}

/* Additional corners via inner spans */
.ornament-corners { position: relative; }
.corner { position: absolute; width: 24px; height: 24px; border-style: solid; border-color: var(--gold); opacity: 0.4; z-index: 2; pointer-events: none; transition: all 0.4s; }
.corner--tl { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.corner--tr { top: -1px; right: -1px; border-width: 2px 2px 0 0; }
.corner--bl { bottom: -1px; left: -1px; border-width: 0 0 2px 2px; }
.corner--br { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }
.ornament-corners:hover .corner { opacity: 0.9; border-color: var(--punk-cyan); }

/* ======== PAGE OUTER BORDER ======== */
.page-border {
  position: fixed;
  inset: 8px;
  border: 1px solid var(--line);
  pointer-events: none;
  z-index: 9988;
}
.page-border::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid var(--line);
}
/* Corner decorations */
.page-border__corner {
  position: absolute;
  width: 32px; height: 32px;
  z-index: 9989;
}
.page-border__corner::before,
.page-border__corner::after {
  content: '';
  position: absolute;
  background: var(--gold);
}
.page-border__corner::before { width: 100%; height: 1.5px; top: 0; left: 0; }
.page-border__corner::after { width: 1.5px; height: 100%; top: 0; left: 0; }
.page-border__corner--tl { top: -1px; left: -1px; }
.page-border__corner--tr { top: -1px; right: -1px; transform: scaleX(-1); }
.page-border__corner--bl { bottom: -1px; left: -1px; transform: scaleY(-1); }
.page-border__corner--br { bottom: -1px; right: -1px; transform: scale(-1); }

/* Animated cyan accent on page border */
.page-border__glow {
  position: absolute;
  top: 0; left: 0;
  width: 120px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--punk-cyan), transparent);
  animation: borderGlowH 8s linear infinite;
  opacity: 0.5;
}
.page-border__glow--right {
  top: 0; left: auto; right: 0;
  width: 2px; height: 120px;
  background: linear-gradient(180deg, transparent, var(--accent), transparent);
  animation: borderGlowV 10s linear infinite;
}
@keyframes borderGlowH {
  0%   { left: -120px; }
  100% { left: calc(100% + 120px); }
}
@keyframes borderGlowV {
  0%   { top: -120px; }
  100% { top: calc(100% + 120px); }
}

/* ======== LAYOUT ======== */
.layout {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 2;
}

/* ======== SIDEBAR ======== */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  background: rgba(250, 245, 238, 0.2);
  border-right: 1px solid rgba(55, 40, 26, 0.1);
  backdrop-filter: blur(18px) saturate(135%);
  z-index: 100;
  font-size: 0.95rem;
  color: var(--text);
  overflow-y: auto;
}

.sidebar__brand {
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.06em;
  color: var(--text);
  line-height: 1;
  overflow-wrap: anywhere;
}
.sidebar__brand span { color: var(--accent); }

.sidebar__tagline {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 20px;
  font-family: var(--font-mono);
}

.sidebar__punk-line {
  height: 2px;
  background: linear-gradient(90deg, var(--punk-cyan), var(--accent), var(--gold), transparent);
  margin-bottom: 24px;
  opacity: 0.6;
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: auto;
}

.sidebar__nav--tier1 {
  gap: 10px;
}

.tier1-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(55, 40, 26, 0.08);
  backdrop-filter: blur(12px);
  color: var(--text);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  transition: all 0.3s;
}

.tier1-link:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: var(--punk-cyan);
  transform: translateY(-2px);
}

.tier1-link.active {
  background: rgba(194, 90, 33, 0.15);
  border-color: var(--accent);
  color: var(--accent);
}

.tier1-link__icon {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
}

.tier1-link.active .tier1-link__icon {
  color: var(--accent);
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(55, 40, 26, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.nav-group__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-group__tier,
.nav-subgroup__tier {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(194, 90, 33, 0.16);
  border: 1px solid rgba(194, 90, 33, 0.18);
  color: var(--accent);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.nav-group__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nav-subgroup {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 12px;
  border-left: 1px solid rgba(55, 40, 26, 0.12);
}

.nav-subgroup__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-subgroup__links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(55, 40, 26, 0.08);
  backdrop-filter: blur(12px);
  color: var(--text);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.3s;
  cursor: pointer;
}

.nav-item__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.nav-item__label {
  color: var(--text);
  line-height: 1.3;
}

.nav-item__meta {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: var(--punk-cyan);
  transform: translateY(-2px);
}

.nav-item.active {
  background: rgba(194, 90, 33, 0.15);
  border-color: var(--accent);
  color: var(--accent);
}

.nav-item__icon {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
}

.nav-item.active .nav-item__icon {
  color: var(--accent);
}

.nav-item.active .nav-item__label,
.nav-item.active .nav-item__meta {
  color: var(--accent);
}

.sidebar__footer {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.8;
  font-family: var(--font-mono);
}

.punk-blink {
  animation: punkBlink 0.8s infinite;
}
@keyframes punkBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* ======== TOP-RIGHT FLOAT ======== */
.top-float {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 110;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(55, 40, 26, 0.08);
  box-shadow: 0 14px 32px rgba(35, 25, 16, 0.08);
  backdrop-filter: blur(18px) saturate(140%);
  border-radius: 16px;
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text);
}

.top-float__badge {
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 1px;
}

.top-float__info {
  color: var(--muted);
}

.top-float__action {
  appearance: none;
  border: 1px solid rgba(55, 40, 26, 0.12);
  background: rgba(255, 255, 255, 0.14);
  color: var(--text);
  border-radius: 999px;
  padding: 7px 12px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  cursor: pointer;
  transition: all 0.25s;
}

.top-float__action:hover {
  border-color: var(--punk-cyan);
  color: var(--punk-cyan);
  transform: translateY(-1px);
}

/* ======== MAIN ======== */
.main {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 60px 3% 80px 3%;
  max-width: 100%;
  overflow-x: hidden;
}

.main [id] {
  scroll-margin-top: 128px;
}

.content-topbar {
  position: sticky;
  top: 18px;
  z-index: 95;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 251, 245, 0.16);
  box-shadow: 0 16px 40px rgba(35, 25, 16, 0.06);
  backdrop-filter: blur(22px) saturate(145%);
}

.content-topbar__groups {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.tier2-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(55, 40, 26, 0.08);
}

.tier2-label {
  display: none;
}

.tier2-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(55, 40, 26, 0.08);
  color: var(--text);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  transition: all 0.25s;
  white-space: nowrap;
}

.tier2-link:hover {
  border-color: var(--punk-cyan);
  color: var(--punk-cyan);
  transform: translateY(-1px);
}

.tier2-link.active {
  background: rgba(194, 90, 33, 0.16);
  border-color: var(--accent);
  color: var(--accent);
}

/* ======== HERO ======== */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 32%);
  gap: 24px;
  margin-bottom: 60px;
  align-items: start;
}

.hero__main-card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(140%);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4%, 48px);
  position: relative;
  overflow: hidden;
  min-width: 0;
}

.hero__side-card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(140%);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3%, 32px);
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.hero__sub {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.hero__title {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.1;
  color: var(--text);
  word-break: break-word;
}

.glitch-gradient {
  background: linear-gradient(135deg, var(--punk-red), var(--accent), var(--punk-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__desc {
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.8;
  font-weight: 600;
  margin-bottom: 28px;
}

.hero__punk-bar {
  height: 3px;
  background: linear-gradient(90deg, var(--punk-cyan), var(--accent), var(--gold));
  margin: 28px 0;
  opacity: 0.8;
}

.hero__rune {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 24px;
  letter-spacing: 1px;
}

.hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.profile-point {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(55, 40, 26, 0.1);
}

.profile-point__label {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profile-point__text {
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.6;
  font-weight: 600;
}

.section-fold {
  margin-top: 22px;
  border-radius: 18px;
  border: 1px solid rgba(55, 40, 26, 0.1);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px) saturate(135%);
  overflow: hidden;
}

.section-fold[open] {
  background: rgba(255, 255, 255, 0.12);
}

.section-fold__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  list-style: none;
}

.section-fold__summary::-webkit-details-marker {
  display: none;
}

.section-fold__summary::after {
  content: "+";
  color: var(--accent);
  font-size: 1rem;
}

.section-fold[open] .section-fold__summary::after {
  content: "-";
}

.section-fold__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 16px 16px;
}

.section-fold__body {
  display: grid;
  gap: 12px;
  padding: 0 16px 16px;
}

.section-fold__text {
  margin: 0;
  color: var(--text);
  font-size: 0.94rem;
  line-height: 1.8;
  font-weight: 600;
}

.section-fold__link {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 252, 247, 0.22);
  border: 1px solid rgba(55, 40, 26, 0.14);
  color: var(--text);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.25s;
}

.section-fold__link:hover {
  border-color: var(--punk-cyan);
  color: var(--punk-cyan);
  transform: translateY(-1px);
}

.studio-overview__panel .section-fold,
.cluster-head .section-fold {
  grid-column: 1 / -1;
}

.chip {
  padding: 0.45rem 0.9rem;
  border: 1px solid rgba(55, 40, 26, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  font-size: 0.92rem;
  color: var(--text);
  font-weight: 600;
  display: inline-block;
  transition: all 0.3s;
}

.chip:hover {
  border-color: var(--punk-cyan);
  background: rgba(47, 201, 194, 0.1);
  transform: translateY(-2px);
}

/* Side card details */
.side-card__label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.side-card__status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2e7d32;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.status-text {
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 700;
}

.side-card__divider {
  border: none;
  height: 1px;
  background: var(--line);
  margin: 16px 0;
}

.side-card__quote {
  font-size: 0.95rem;
  font-style: italic;
  color: var(--muted);
  margin-bottom: 20px;
  line-height: 1.7;
}

.side-card__ascii {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  white-space: pre;
  margin-bottom: 20px;
  line-height: 1.4;
}

.side-card__stats {
  display: flex;
  justify-content: space-around;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.stat-block {
  text-align: center;
  flex: 1;
}

.stat-block__num {
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--accent);
  font-family: var(--font-mono);
}

.stat-block__label {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 4px;
}

/* ======== INNER BORDER DECORATION ======== */
.inner-border {
  position: absolute;
  top: 8px; left: 8px; right: 8px; bottom: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: calc(var(--radius-lg) - 6px);
  pointer-events: none;
  opacity: 0.4;
}

/* ======== SECTION HEADING ======== */
.section-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 40px;
  margin-top: 60px;
}

.section-heading__tag {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.section-heading__title {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text);
  flex: 1;
}

.section-heading__title::before {
  content: '[';
  color: var(--muted);
  margin-right: 8px;
}

.section-heading__title::after {
  content: ']';
  color: var(--muted);
  margin-left: 8px;
}

.section-heading__line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}

.studio-overview {
  margin-bottom: 60px;
}

.studio-overview__panel,
.cluster-head {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(140%);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4%, 40px);
  position: relative;
  overflow: hidden;
}

.studio-overview__panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  gap: 24px;
}

.studio-overview__eyebrow,
.cluster-head__tag {
  display: inline-block;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.studio-overview__title,
.cluster-head__title {
  margin: 0 0 16px;
  font-size: clamp(2rem, 4vw, 2.6rem);
  line-height: 1.08;
  color: var(--text);
}

.studio-overview__desc,
.cluster-head__desc {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.85;
  font-weight: 600;
}

.studio-overview__desc + .studio-overview__desc {
  margin-top: 14px;
}

.studio-pillars {
  display: grid;
  gap: 14px;
}

.pillar-card {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(55, 40, 26, 0.1);
}

.pillar-card__tag {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pillar-card__title {
  margin-bottom: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.pillar-card__desc {
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.7;
  font-weight: 600;
}

.result-cluster {
  margin-bottom: 56px;
}

.cluster-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.9fr);
  gap: 24px;
  margin-bottom: 24px;
}

.cluster-head__meta {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 10px;
}

.cluster-badge {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(55, 40, 26, 0.1);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.modules--cluster {
  margin-bottom: 0;
}

/* ======== MODULES GRID ======== */
.modules {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 24px;
  margin-bottom: 60px;
}

.module-card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(140%);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 32px);
  position: relative;
  transition: all 0.3s;
  display: flex;
  min-width: 0;
  overflow: hidden;
  flex-direction: column;
}

.module-card--link {
  text-decoration: none;
  color: inherit;
}

.module-card--link:visited {
  color: inherit;
}

.module-card:hover {
  transform: translateY(-8px);
  border-color: var(--punk-cyan);
  box-shadow: 0 28px 72px rgba(47, 201, 194, 0.15);
}

.module-card__icon {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.module-card__title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.module-card__desc {
  font-size: clamp(0.85rem, 1.5vw, 0.95rem);
  color: var(--text);
  line-height: 1.7;
  font-weight: 600;
  margin-bottom: 16px;
  flex: 1;
  word-break: break-word;
}

.module-card__sep {
  border: none;
  height: 1px;
  background: var(--line);
  margin: 16px 0;
}

.module-card__tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.module-tag {
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(255, 252, 247, 0.55);
  border: 1px solid rgba(55, 40, 26, 0.22);
  font-size: 0.8rem;
  color: #1b1611;
  font-family: var(--font-mono);
  font-weight: 700;
}

.module-card__status {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 12px;
  border-radius: 8px;
  display: inline-block;
  width: fit-content;
}

.module-card__status--live {
  background: rgba(46, 125, 50, 0.18);
  color: #2e7d32;
  border: 1px solid rgba(46, 125, 50, 0.3);
}

.module-card__status--dev {
  background: rgba(194, 90, 33, 0.15);
  color: var(--accent);
  border: 1px solid rgba(194, 90, 33, 0.3);
}

.module-card__status--soon {
  background: rgba(184, 148, 62, 0.15);
  color: var(--gold);
  border: 1px solid rgba(184, 148, 62, 0.3);
}

/* ======== MARQUEE ======== */
.punk-marquee {
  width: 100%;
  overflow: hidden;
  margin: 60px 0;
  padding: 20px 0;
  background: rgba(255, 255, 255, 0.05);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.punk-marquee__track {
  display: flex;
  gap: 16px;
  animation: scroll-marquee 20s linear infinite;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--muted);
}

.punk-marquee span {
  display: inline-block;
}

.punk-highlight {
  color: var(--accent);
  font-weight: 600;
}

.punk-cyan-hl {
  color: var(--punk-cyan);
}

@keyframes scroll-marquee {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* ======== PHILOSOPHY ======== */
.philosophy {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(140%);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4%, 48px);
  margin: 60px 0;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.philosophy__quote {
  font-size: 1.3rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 20px;
}

.philosophy__attr {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.5px;
}

/* ======== ROADMAP ======== */
.roadmap {
  margin-bottom: 60px;
}

.roadmap__timeline {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.timeline-item {
  padding: clamp(20px, 3vw, 32px);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(140%);
  border-radius: var(--radius-lg);
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.timeline-item:hover {
  transform: translateY(-4px);
  border-color: var(--punk-cyan);
  box-shadow: 0 28px 72px rgba(47, 201, 194, 0.15);
}

.timeline-item__phase {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  font-weight: 700;
}

.timeline-item__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.timeline-item__desc {
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 600;
  line-height: 1.6;
}

/* ======== FOOTER ======== */
.footer-section {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(140%);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4%, 48px);
  position: relative;
  margin-top: 80px;
  text-align: center;
}

.footer-section__text {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 24px;
}

.footer-section__links {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-link {
  padding: 10px 20px;
  border-radius: 12px;
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.3s;
  font-family: var(--font-mono);
}

.footer-link--primary {
  background: rgba(194, 90, 33, 0.2);
  border: 1px solid var(--accent);
  color: var(--accent);
}

.footer-link--primary:hover {
  background: rgba(194, 90, 33, 0.3);
  transform: translateY(-2px);
}

.footer-link--ghost {
  border: 1px solid var(--line);
  color: var(--text);
}

.footer-link--ghost:hover {
  border-color: var(--punk-cyan);
  color: var(--punk-cyan);
  background: rgba(47, 201, 194, 0.08);
}

.auth-shell {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
}

.auth-card {
  width: min(100%, 560px);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(140%);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 40px);
  position: relative;
  overflow: hidden;
}

.auth-card__brand {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.06em;
  margin-bottom: 18px;
}

.auth-card__brand span {
  color: var(--accent);
}

.auth-card__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.auth-card__title {
  margin: 0 0 14px;
  font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 1.08;
}

.auth-card__desc {
  margin: 0 0 24px;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.8;
  font-weight: 600;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-field {
  display: grid;
  gap: 8px;
}

.auth-field__label {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-field input {
  width: 100%;
  border: 1px solid rgba(55, 40, 26, 0.12);
  background: rgba(255, 255, 255, 0.2);
  color: var(--text);
  border-radius: 16px;
  padding: 14px 16px;
  font: inherit;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

.auth-field input:focus {
  border-color: var(--punk-cyan);
  box-shadow: 0 0 0 3px rgba(47, 201, 194, 0.12);
  background: rgba(255, 255, 255, 0.26);
}

.auth-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(214, 58, 58, 0.2);
  background: rgba(214, 58, 58, 0.08);
  color: #8e2626;
  font-size: 0.92rem;
  font-weight: 600;
}

.auth-submit {
  appearance: none;
  border: 1px solid rgba(194, 90, 33, 0.3);
  background: rgba(194, 90, 33, 0.16);
  color: var(--accent);
  border-radius: 16px;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s;
}

.auth-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  background: rgba(194, 90, 33, 0.24);
}

.auth-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

.control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.control-panel {
  position: relative;
  padding: 28px;
  border-radius: 28px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.38), rgba(255, 248, 238, 0.18)),
    rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(64, 38, 24, 0.08);
  box-shadow: 0 20px 48px rgba(73, 48, 27, 0.12);
}

.control-panel__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.control-state-badge {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.control-state-badge.is-online {
  background: rgba(47, 201, 194, 0.14);
  color: #0e6d67;
  border: 1px solid rgba(47, 201, 194, 0.24);
}

.control-state-badge.is-offline {
  background: rgba(194, 90, 33, 0.12);
  color: #9b4c1b;
  border: 1px solid rgba(194, 90, 33, 0.24);
}

.control-meta-block {
  color: rgba(56, 35, 20, 0.82);
  line-height: 1.8;
  font-size: 0.95rem;
}

.control-cap-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 22px 0;
}

.control-summary-text {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
}

.control-action-stack {
  display: grid;
  gap: 14px;
}

.control-field {
  display: grid;
  gap: 8px;
}

.control-field__label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.control-field input {
  width: 100%;
  border: 1px solid rgba(55, 40, 26, 0.12);
  background: rgba(255, 255, 255, 0.2);
  color: var(--text);
  border-radius: 16px;
  padding: 14px 16px;
  font: inherit;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

.control-field input:focus {
  border-color: var(--punk-cyan);
  box-shadow: 0 0 0 3px rgba(47, 201, 194, 0.12);
  background: rgba(255, 255, 255, 0.28);
}

.control-button {
  appearance: none;
  border: 1px solid rgba(194, 90, 33, 0.28);
  background: rgba(194, 90, 33, 0.14);
  color: var(--accent);
  border-radius: 16px;
  padding: 14px 18px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s;
}

.control-button:hover:not(:disabled) {
  transform: translateY(-1px);
  background: rgba(194, 90, 33, 0.22);
}

.control-button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.control-button--ghost {
  background: rgba(47, 201, 194, 0.1);
  border-color: rgba(47, 201, 194, 0.22);
  color: #0f6f69;
}

.control-button--ghost:hover:not(:disabled) {
  background: rgba(47, 201, 194, 0.16);
}

.control-feed {
  display: grid;
  gap: 18px;
}

.control-task-feed {
  display: grid;
  gap: 16px;
}

.control-task {
  position: relative;
  padding: 22px;
  border-radius: 24px;
}

.control-task__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.control-task__type {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.control-task__meta {
  font-size: 0.82rem;
  color: rgba(56, 35, 20, 0.72);
  line-height: 1.7;
}

.control-task__status {
  padding: 8px 12px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.control-task__status--queued,
.control-task__status--assigned {
  background: rgba(194, 90, 33, 0.12);
  color: #9b4c1b;
}

.control-task__status--running {
  background: rgba(47, 201, 194, 0.12);
  color: #0f6f69;
}

.control-task__status--completed {
  background: rgba(53, 148, 87, 0.14);
  color: #2f7a48;
}

.control-task__status--failed {
  background: rgba(214, 58, 58, 0.12);
  color: #9a2e2e;
}

.control-task__result {
  margin: 14px 0 0 0;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.26);
  border: 1px solid rgba(55, 40, 26, 0.08);
  color: rgba(42, 25, 14, 0.86);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.7;
  overflow-x: auto;
}

.control-task__result--error {
  border-color: rgba(214, 58, 58, 0.18);
  background: rgba(214, 58, 58, 0.08);
  color: #8e2626;
}

.control-task__logs {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.control-task__log {
  display: grid;
  gap: 2px;
  padding-top: 8px;
  border-top: 1px dashed rgba(55, 40, 26, 0.1);
  font-size: 0.8rem;
  color: rgba(56, 35, 20, 0.76);
}

.control-task__log-level {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.control-empty {
  padding: 26px;
  border-radius: 24px;
  border: 1px dashed rgba(55, 40, 26, 0.18);
  background: rgba(255, 255, 255, 0.18);
  color: rgba(56, 35, 20, 0.78);
}

/* ======== CURSOR ======== */
.cursor-inner {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  opacity: 0.8;
}

.cursor-outer {
  position: fixed;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--punk-cyan);
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  opacity: 0.4;
  transition: all 0.1s;
}

.cursor-outer.hover {
  width: 50px;
  height: 50px;
  border-color: var(--accent);
  opacity: 0.6;
}

/* ======== SCROLL REVEAL ======== */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ======== RESPONSIVE ======== */
@media (max-width: 1200px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 35%);
    gap: 20px;
  }
}

@media (max-width: 1024px) {
  .sidebar {
    width: 220px;
  }
  .main {
    margin-left: 220px;
    padding: 40px 3% 60px 3%;
  }
  .hero {
    grid-template-columns: 1fr;
  }
  .hero__side-card {
    width: 100%;
  }
  .content-topbar {
    top: 14px;
  }
  .studio-overview__panel,
  .cluster-head,
  .profile-points,
  .control-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 16px;
  }
  .sidebar__nav {
    gap: 10px;
  }
  .content-topbar {
    margin-bottom: 20px;
    padding: 14px;
  }
  .content-topbar__groups {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .tier2-group {
    flex: 0 0 auto;
  }
  .nav-group {
    padding: 12px;
  }
  .nav-subgroup {
    padding-left: 10px;
  }
  .nav-item {
    padding: 9px 10px;
    font-size: 0.8rem;
  }
  .sidebar__footer { display: none; }
  .sidebar__punk-line { display: none; }
  .layout {
    flex-direction: column;
  }
  .main {
    margin-left: 0;
    padding: 24px 4% 40px 4%;
  }
  .hero__title {
    font-size: clamp(1.8rem, 7vw, 2.6rem);
  }
  .hero__main-card,
  .hero__side-card {
    padding: 24px;
  }
  .modules {
    gap: 16px;
  }
  .top-float { display: none; }
  .page-border { display: none; }
  .module-card {
    padding: 20px;
  }
  .section-heading {
    flex-direction: column;
    align-items: flex-start;
  }
  .studio-overview__panel,
  .cluster-head {
    padding: 24px;
  }
  .control-panel,
  .control-task {
    padding: 22px;
  }
}
