:root {
  --bg: #ffffff;
  --bg-glass: rgba(255,255,255,0.85);
  --txt: #000000;
  --txt-dim: #555555;
  --txt-muted: #777777;
  --txt-subtle: #bbbbbb;
  --border: #000000;
  --border-light: #eeeeee;
  --footer-bg: #000000;
  --footer-txt: #ffffff;
  --footer-muted: #555555;
  --footer-link: #aaaaaa;
  --footer-border: #222222;
  --hover-bg: #000000;
  --hover-txt: #ffffff;
  --logo-filter: none;
  --noise-opacity: 0.04;
  --accent: #ff3300;
}

[data-theme="dark"] {
  --bg: #000000;
  --bg-glass: rgba(0,0,0,0.85);
  --txt: #ffffff;
  --txt-dim: #999999;
  --txt-muted: #888888;
  --txt-subtle: #555555;
  --border: #ffffff;
  --border-light: #222222;
  --footer-bg: #000000;
  --footer-txt: #ffffff;
  --footer-muted: #555555;
  --footer-link: #aaaaaa;
  --footer-border: #222222;
  --hover-bg: #ffffff;
  --hover-txt: #000000;
  --logo-filter: invert(1);
  --noise-opacity: 0.06;
}

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

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg);
  color: var(--txt);
  line-height: 1.1;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.6s ease, color 0.6s ease;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99999;
  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.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: var(--noise-opacity);
  mix-blend-mode: overlay;
}

.app-container { display: flex; min-height: 100vh; width: 100vw; }

.sidebar {
  width: 35%;
  min-width: 320px;
  border-right: 2px solid var(--border);
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 10;
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  transition: background 0.6s ease, border-color 0.6s ease;
}

.logo-container { perspective: 1000px; }
.word-logo {
  height: 38px;
  width: auto;
  display: block;
  filter: var(--logo-filter);
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), filter 0.6s ease;
  transform-style: preserve-3d;
}
.logo-container:hover .word-logo { transform: rotateX(180deg); }

.sidebar-statement {
  margin-top: 48px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  line-height: 1.7;
  color: var(--txt-dim);
  max-width: 280px;
  transition: color 0.6s ease;
}
.sidebar-statement span { color: var(--txt-muted); transition: color 0.6s ease; }

.nav-list { list-style: none; padding-top: 40px; }
.nav-item {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: block;
  opacity: 0.5;
  transition: opacity 0.2s, color 0.6s ease;
  text-decoration: none;
  color: var(--txt);
}
.nav-item:hover { opacity: 1; }
.nav-item.active { opacity: 1; }
.nav-work { cursor: pointer; }

.work-sub {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin-top: 0;
  margin-left: 14px;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.25s ease,
              margin-top 0.3s ease;
}
.work-sub.open { max-height: 300px; opacity: 1; margin-top: 6px; }
.work-sub a {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--txt-muted);
  text-decoration: none;
  margin-bottom: 7px;
  transition: color 0.2s ease;
  letter-spacing: 0.02em;
}
.work-sub a:hover { color: var(--txt); }
.work-sub a.current { color: var(--txt); }

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  color: var(--txt-muted);
  margin-top: 24px;
  cursor: pointer;
  user-select: none;
  transition: color 0.6s ease;
}
.theme-opt { opacity: 0.4; transition: opacity 0.3s; }
.theme-opt.active { opacity: 1; }
.theme-sep { opacity: 0.25; }

.studio-info {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  color: var(--txt-muted);
  margin-top: 24px;
  line-height: 1.7;
  transition: color 0.6s ease;
}

.menu-btn {
  display: none;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  background: none;
  border: none;
  color: var(--txt);
  opacity: 0.5;
  transition: opacity 0.2s, color 0.6s ease;
  padding: 0;
}
.menu-btn:hover { opacity: 1; }
.menu-btn .menu-label-close { display: none; }
.sidebar.menu-open .menu-btn .menu-label-open { display: none; }
.sidebar.menu-open .menu-btn .menu-label-close { display: inline; }

.content-pane {
  width: 65%;
  margin-left: 35%;
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.6s ease;
}

.inner-content {
  padding: 100px 60px;
  flex-grow: 1;
}

.label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 40px;
  display: block;
  letter-spacing: 0.04em;
  transition: color 0.6s ease;
}

.page-header {
  padding: 100px 40px 80px;
  border-bottom: 2px solid var(--border);
  transition: border-color 0.6s ease;
}
.page-eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  color: var(--txt-subtle);
  margin-bottom: 32px;
  display: flex;
  justify-content: space-between;
  transition: color 0.6s ease;
}

.section {
  padding: 72px 40px;
  border-bottom: 2px solid var(--border);
  transition: border-color 0.6s ease;
}
.section:last-of-type { border-bottom: none; }

.section-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  color: var(--txt-subtle);
  margin-bottom: 48px;
  display: block;
  transition: color 0.6s ease;
}

.section-heading {
  font-size: clamp(28px, 4.5vw, 48px);
  font-weight: 900;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  line-height: 0.92;
  margin-bottom: 40px;
}

.prose {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  line-height: 1.9;
  color: var(--txt-dim);
  max-width: 500px;
  transition: color 0.6s ease;
}
.prose p + p { margin-top: 20px; }
.prose strong { color: var(--txt); font-weight: 500; }

.nav-block { list-style: none; }
.nav-link {
  display: block;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-light);
  text-decoration: none;
  color: var(--txt);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  transition: color 0.2s, border-color 0.6s ease;
}
.nav-link:first-child { border-top: 1px solid var(--border-light); }
.nav-link:hover { color: var(--txt-muted); padding-left: 12px; }
.nav-link-arrow { float: right; transition: transform 0.25s ease; }
.nav-link:hover .nav-link-arrow { transform: translateX(4px); }

.cta-section { padding: 80px 40px; }
.cta-heading {
  font-size: clamp(36px, 7vw, 88px);
  font-weight: 900;
  letter-spacing: -0.07em;
  text-transform: uppercase;
  line-height: 0.88;
  margin-bottom: 48px;
}
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bg);
  background: var(--txt);
  padding: 15px 28px;
  border: 2px solid var(--txt);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.6s ease;
}
.cta-btn:hover { background: var(--bg); color: var(--txt); }
.cta-arrow { transition: transform 0.25s ease; }
.cta-btn:hover .cta-arrow { transform: translateX(5px); }

.specs { margin-bottom: 100px; }
.specs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.spec {
  padding: 20px 0;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  transition: border-color 0.6s ease;
}
.spec:first-child { border-top: 1px solid var(--border-light); }
.spec-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--txt-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: color 0.6s ease;
}
.spec-value {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--txt-dim);
  text-align: right;
  transition: color 0.6s ease;
}

/* ── Footer ── */
.system-footer {
  padding: 80px 60px 56px;
  border-top: 2px solid var(--footer-border);
  background: var(--footer-bg);
  color: var(--footer-txt);
  transition: border-color 0.6s ease;
}
.footer-inner {
  display: flex;
  align-items: flex-start;
  gap: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 48px;
  flex: 1;
}
.footer-col h4 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--footer-muted);
  margin-bottom: 16px;
}
.footer-link {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--footer-link);
  text-decoration: none;
  margin-bottom: 10px;
  transition: color 0.2s ease;
}
.footer-link:hover { color: var(--footer-txt); }
.footer-mark {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--footer-muted);
  white-space: nowrap;
  padding-top: 4px;
}
.footer-copy {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--footer-muted);
  margin-top: 72px;
  letter-spacing: 0.04em;
  transition: color 0.6s ease;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.nav-item:focus-visible,
.theme-toggle:focus-visible,
.menu-btn:focus-visible,
.cta-btn:focus-visible,
.nav-link:focus-visible { outline: 2px solid var(--txt); outline-offset: 4px; }

@media (max-width: 1024px) {
  .sidebar { min-width: 280px; padding: 32px; }
  .inner-content { padding: 80px 40px; }
  .page-header { padding: 80px 40px 64px; }
  .section { padding: 56px 40px; }
  .cta-section { padding: 64px 40px; }
  .system-footer { padding: 60px 40px 56px; }
  .footer-grid { gap: 32px; }
  .footer-copy { margin-top: 56px; }
}

@media (max-width: 900px) {
  .app-container { flex-direction: column; }
  .sidebar {
    width: 100%; min-width: unset;
    position: relative; height: auto;
    border-right: none;
    border-bottom: 2px solid var(--border);
    padding: 20px;
  }
  .sidebar-statement,
  .studio-info { display: none; }
  .sidebar > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .logo-container { perspective: none; }
  .logo-container:hover .word-logo { transform: none; }
  .menu-btn { display: block; }
  .nav-list {
    padding-top: 0; margin-top: 0;
    max-height: 0; overflow: hidden; opacity: 0;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  }
  .sidebar.menu-open .nav-list {
    max-height: 600px; opacity: 1; padding-top: 16px;
  }
  .work-sub { margin-left: 18px; }
  .theme-toggle { margin-top: 12px; }
  .content-pane { width: 100%; margin-left: 0; }
  .inner-content { padding: 48px 20px; }
  .page-header { padding: 48px 20px 40px; }
  .section { padding: 40px 20px; }
  .cta-section { padding: 40px 20px; }

  .specs-grid { grid-template-columns: 1fr; }
  .word-logo { height: 28px; }

  .system-footer {
    padding: 56px 24px 48px;
    border-top: 2px solid var(--footer-border);
  }
  .footer-inner {
    flex-direction: column;
    gap: 40px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    width: 100%;
  }
  .footer-col h4 {
    font-size: 10px;
    margin-bottom: 14px;
  }
  .footer-link {
    font-size: 12px;
    margin-bottom: 10px;
  }
  .footer-mark { display: none; }
  .footer-copy {
    margin-top: 0;
    padding-top: 32px;
    border-top: 1px solid var(--footer-border);
    font-size: 10px;
    text-align: center;
  }
}

@media (max-width: 560px) {
  .system-footer {
    padding: 48px 20px 40px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px 24px;
  }
  .footer-col h4 {
    font-size: 10px;
    margin-bottom: 12px;
  }
  .footer-link {
    font-size: 12px;
    margin-bottom: 10px;
  }
  .footer-copy {
    font-size: 10px;
    text-align: center;
  }
  .page-eyebrow { flex-direction: column; gap: 4px; }
}