/* ==========================================================================
   HOMEPAGE STYLESHEET: WORK-FIRST TECHNICAL SHOWCASE
   Calibrated Systems Engineering Aesthetic
   ========================================================================== */

/* --- 1. Masthead Section --- */
.masthead-section {
  padding: 48px 0 36px;
  border-bottom: 1px solid var(--border-subtle);
}

.masthead-inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.masthead-identity {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.masthead-name {
  font-size: clamp(1.85rem, 3.5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--text-primary);
}

.masthead-role {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-primary);
  margin: 0;
}

.masthead-context {
  font-size: 1.025rem;
  color: var(--text-secondary);
  max-width: 800px;
  margin: 4px 0 0;
  line-height: 1.55;
}

/* Direct channels toolbar */
.masthead-channels {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding-top: 4px;
}

.channel-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.channel-text-mobile {
  display: none;
}

.channel-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 5px 11px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 120ms ease;
}

.channel-link:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
  text-decoration: none;
}

.channel-link-primary {
  color: var(--accent-primary);
  border-color: var(--accent-border);
  background: var(--accent-subtle);
  font-weight: 600;
}

/* --- 2. Evidence Benchmarks Grid (Calibrated Engineering Specification) --- */
.benchmarks-spec-panel {
  margin-top: 24px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

.benchmarks-spec-header {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.benchmarks-spec-grid {
  display: flex;
  align-items: stretch;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.benchmark-spec-item {
  flex: 0 0 calc((100% - 24px) / 3);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

@media (max-width: 900px) {
  .benchmark-spec-item {
    flex: 0 0 calc((100% - 12px) / 2);
  }
}

@media (max-width: 600px) {
  .benchmark-spec-item {
    flex: 0 0 100%;
  }
}

.benchmark-spec-param {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.benchmark-spec-val {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent-primary);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.benchmark-spec-scope {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
}

.benchmark-spec-ctx {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0;
}


/* --- 3. Flagship Case Studies (Dominates Visual Hierarchy) --- */
.flagship-list {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.case-study {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.case-header {
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
}

.case-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
}

.case-num {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent-primary);
}

.case-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 10px;
}

.case-body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.case-grid-2col {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
}

@media (max-width: 840px) {
  .case-grid-2col {
    grid-template-columns: 1fr;
  }
}

.case-block-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.case-block-title::before {
  content: "■";
  font-size: 0.55rem;
  color: var(--accent-primary);
}

.constraint-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.constraint-list li {
  font-size: 0.88rem;
  color: var(--text-secondary);
  position: relative;
  padding-left: 18px;
  line-height: 1.5;
}

.constraint-list li::before {
  content: "→";
  font-family: var(--font-mono);
  position: absolute;
  left: 0;
  color: var(--accent-primary);
}

/* Architecture Flow Diagrams */
.diagram-container {
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
}

.diagram-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 14px;
}

.diagram-flow {
  display: flex;
  align-items: stretch;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.diagram-node {
  flex: 1;
  min-width: 140px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.node-step {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent-primary);
  font-weight: 600;
}

.node-name {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.node-type {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.node-annot {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: 4px;
  border-top: 1px dashed var(--border-subtle);
}

.diagram-arrow {
  display: flex;
  align-items: center;
  color: var(--border-strong);
  font-size: 1.1rem;
}

/* Engineering Decisions List */
.decisions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 14px;
}

.decision-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.decision-card h4 {
  font-size: 0.88rem;
  color: var(--text-primary);
  margin: 0 0 4px;
}

.decision-card p {
  font-size: 0.825rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.45;
}

/* Evidence footer in case study */
.case-evidence-bar {
  padding: 14px 18px;
  background: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.evidence-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
}

.evidence-metric {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-primary);
  margin-right: 6px;
}

/* --- 4. Systems Architecture Section (Grounded in Systems) --- */
.arch-dossier-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.arch-dossier-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.arch-dossier-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 10px;
}

.arch-concept-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.arch-system-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-primary);
  background: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
}

.arch-dossier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 16px;
  font-size: 0.85rem;
}

.arch-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.arch-field-lbl {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.arch-field-val {
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
}

/* --- 5. Concise Production Chronology --- */
.chronology-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.chronology-item {
  border-left: 2px solid var(--border-strong);
  padding-left: 18px;
  position: relative;
}

.chronology-item::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 5px;
  width: 8px;
  height: 8px;
  background: var(--bg-canvas);
  border: 2px solid var(--accent-primary);
  border-radius: 50%;
}

.chronology-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 2px;
}

.role-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.role-period {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.role-system-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-primary);
  margin-bottom: 6px;
}

.role-contribution {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
  white-space: pre-line;
}

/* Embedded Technical Foundation */
.foundation-panel {
  margin-top: 32px;
  padding: 20px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.foundation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 16px;
  margin-top: 14px;
}

.foundation-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

.foundation-item h4 {
  font-size: 0.88rem;
  margin: 0 0 4px;
}

.foundation-school {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 6px;
}

.foundation-focus {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0;
}

/* --- 6. Secondary Artifacts Grid --- */
/* .artifacts-grid removed — replaced by Owl Carousel (.artifacts-carousel) */

/* Owl Carousel — artifacts */
.artifacts-carousel .owl-stage {
  display: flex;
  align-items: stretch;
}
.artifacts-carousel .owl-item {
  display: flex;
}
.artifacts-carousel .owl-dots {
  margin-top: 20px;
  text-align: center;
}
.artifacts-carousel .owl-dot span {
  width: 8px;
  height: 8px;
  background: var(--border-subtle);
  border-radius: 50%;
  margin: 0 4px;
  display: block;
  transition: background 200ms ease;
}
.artifacts-carousel .owl-dot.active span,
.artifacts-carousel .owl-dot:hover span {
  background: var(--accent-gold, #c9a84c);
}

.artifact-card {
  width: 100%;
  height: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  transition: border-color 120ms ease;
}

.artifact-card:hover {
  border-color: var(--border-strong);
}

.artifact-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.artifact-head h3 {
  font-size: 0.92rem;
  margin: 0;
}

.artifact-desc {
  font-size: 0.825rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.45;
}

.artifact-links {
  margin-top: auto;
  padding-top: 6px;
}

/* --- 7. Contact Section --- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 32px;
}

@media (max-width: 900px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }
}

.contact-channels {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.channel-entry {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-wrap: anywhere;
}

.channel-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.channel-val {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-primary);
  word-break: break-word;
}

.contact-form-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
}

/* QR Code Preview Thumbnail in Admin */
.qr-thumbnail {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: #ffffff;
  padding: 2px;
  display: block;
}

/* --- 8. Comprehensive Responsive System --- */
@media (max-width: 900px) {
  .masthead-section {
    padding: 32px 0 24px;
  }
  .case-header {
    padding: 18px 20px 16px;
  }
  .case-body {
    padding: 18px 20px;
    gap: 20px;
  }
  .benchmarks-spec-panel {
    padding: 14px 16px;
  }
  .foundation-panel {
    padding: 16px;
  }
  .contact-form-wrap {
    padding: 16px;
  }
  .arch-dossier-card {
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .channel-text-desktop {
    display: none;
  }
  .channel-text-mobile {
    display: inline;
  }
  .channel-row {
    gap: 6px;
  }
  .channel-link {
    font-size: 0.72rem;
    padding: 4px 8px;
    gap: 4px;
  }
  .case-evidence-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .case-evidence-bar .btn {
    width: 100%;
  }
}

@media (max-width: 360px) {
  .channel-link {
    font-size: 0.65rem;
    padding: 4px 6px;
  }
}
