:root {
  --bg: #0c0c0c;
  --bg-2: #111111;
  --bg-3: #1a1a1a;
  --border: #222222;
  --border-bright: #333333;
  --text: #d0d0d0;
  --text-dim: #7a7a7a;
  --text-dimmer: #3d3d3d;
  --accent: #ffffff;
  --accent-dim: #aaaaaa;
  --accent-glow: rgba(255, 255, 255, 0.08);
  --accent-2: #c0c0c0;
  --accent-2-glow: rgba(200, 200, 200, 0.1);
  --green: #b0b0b0;
  --mono: "JetBrains Mono", "Fira Code", "Cascadia Code", ui-monospace, monospace;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── GRID OVERLAY ── */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 56px;
  background: rgba(8, 11, 16, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}

.nav-logo span { color: var(--text-dim); }

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  text-decoration: none;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.15s;
}

.nav-links a:hover { color: var(--accent); }

.nav-contact {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  text-decoration: none;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.15s;
}

.nav-contact:hover { color: var(--accent); }

/* ── LAYOUT ── */
main { position: relative; z-index: 1; }

section { padding: 5rem 2rem; }

.container {
  max-width: 1100px;
  margin: 0 auto;
}

/* ── LABELS ── */
.label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.label::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 1px;
  background: var(--accent);
}

/* ── HERO ── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 56px;
  position: relative;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.hero-text { }

.hero-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hero-eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--text-dim);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  color: #fff;
}

h1 .accent { color: var(--accent); }

.hero-desc {
  font-size: 16px;
  color: var(--text-dim);
  max-width: 480px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 3px;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #000;
}

.btn-primary:hover {
  background: #e0e0e0;
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-bright);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── HERO PANEL (right side) ── */
.hero-panel {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  font-family: var(--mono);
}

.panel-header {
  padding: 10px 16px;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.05em;
}

.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot-red    { background: #ff5f57; }
.dot-yellow { background: #ffbd2e; }
.dot-green  { background: #28c840; }

.panel-body { padding: 1.25rem; }

.panel-body--image {
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cad-image {
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  display: block;
  filter: invert(1);
  opacity: 0.85;
}

.section-heading {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 3rem;
}

/* ── CONTACT ── */
#contact {
  border-top: 1px solid var(--border);
}

.contact-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-item {
  display: flex;
  align-items: baseline;
  gap: 2rem;
}

.contact-key {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dimmer);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  min-width: 60px;
}

.contact-val {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text);
}

.contact-val a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s;
}

.contact-val a:hover { color: var(--accent); }

/* ── FOOTER ── */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-left {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dimmer);
}

.footer-left strong { color: var(--text-dim); }

.footer-right {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dimmer);
}

/* ── COMPONENTS GALLERY ── */
#components { }

.gallery-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  background: transparent;
  border: none;
  margin-top: 2.5rem;
  justify-content: center;
}

.gallery-card {
  position: relative;
  width: calc(33.333% - 1px);
  min-width: 220px;
  aspect-ratio: 3 / 4;
  background: var(--bg-2);
  overflow: hidden;
  cursor: pointer;
}

.gallery-img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.gallery-img .cad-image {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
}

.gallery-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 3rem;
  font-weight: 700;
  color: var(--border-bright);
  border: 1px dashed var(--border-bright);
  margin: 2rem;
  width: calc(100% - 4rem);
  height: calc(100% - 4rem);
  border-radius: 2px;
}

.gallery-coming-soon {
  position: absolute;
  top: 1rem;
  left: 0;
  right: 0;
  z-index: 2;
  text-align: center;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dimmer);
  background: var(--bg-3);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 5px 0;
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 8, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  opacity: 0;
  transition: opacity 0.2s ease;
  padding: 2rem;
}

.gallery-card:hover .gallery-overlay { opacity: 1; }

.gallery-name {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gallery-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  max-width: 180px;
}

.gallery-actions .btn {
  width: 100%;
  justify-content: center;
  font-size: 11px;
}

/* ── PDF VIEWER ── */
#pdf-view { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.pdf-shell {
  margin-top: 2rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.pdf-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1rem;
  height: 44px;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
}

.pdf-filename {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.pdf-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.pdf-btn {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.1s;
  line-height: 1;
}

.pdf-btn:hover {
  color: var(--accent);
  border-color: var(--border-bright);
  background: var(--bg-2);
}

.pdf-page-info {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  display: flex;
  gap: 4px;
  padding: 0 4px;
  min-width: 52px;
  justify-content: center;
}

.pdf-sep { color: var(--text-dimmer); }

.pdf-divider {
  width: 1px;
  height: 20px;
  background: var(--border-bright);
  margin: 0 4px;
}

.pdf-zoom-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  min-width: 38px;
  text-align: center;
}

.pdf-viewport {
  background: var(--bg);
  min-height: 480px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: auto;
  padding: 2rem;
}

#pdf-canvas {
  display: none;
  box-shadow: 0 4px 32px rgba(0,0,0,0.6);
  max-width: 100%;
}

.pdf-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 320px;
  color: var(--text-dimmer);
  font-family: var(--mono);
}

.pdf-placeholder-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.pdf-placeholder-text { font-size: 13px; color: var(--text-dim); }
.pdf-placeholder-sub  { font-size: 11px; color: var(--text-dimmer); }
.pdf-placeholder-sub code { color: var(--text-dim); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-panel { display: none; }
}

@media (max-width: 600px) {
  .nav-links { display: none; }
  section { padding: 3rem 1.25rem; }
  footer { flex-direction: column; gap: 0.75rem; text-align: center; }
}
