/* ==========================================================================
   Frank Chen — Engineering Portfolio & Hub
   Design Language: The Quiet Instrument (Anti-Slop / Radical Understatement)
   ========================================================================== */

:root {
  /* Surface & Background — No Thin Lines, Defined by Pure Fills */
  --bg-ground: #0a0c10;
  --bg-surface: #13161f;
  --bg-surface-elevated: #1a1e2a;
  --bg-surface-highlight: #232938;

  /* Typography Colors — High Contrast (Anti-Grey) */
  --text-primary: #f8fafc;
  --text-lead: #e2e8f0;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --text-inverse: #0a0c10;

  /* Functional Accents */
  --accent-amber: #f59e0b;
  --accent-green: #10b981;
  --accent-green-bg: rgba(16, 185, 129, 0.16);

  /* Typography Steps */
  --font-stack: "Albert Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --step-small: 14px;
  --step-body: 17px;
  --step-lead: 20px;
  --step-h3: 26px;
  --step-h2: clamp(32px, 26px + 1.6vw, 44px);
  --step-head: clamp(52px, 38px + 4.8vw, 84px);

  /* Max Measure */
  --content-max-width: 1040px;
  --page-margin: clamp(1.5rem, 4.5vw, 3.5rem);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--bg-ground);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-stack);
  font-size: var(--step-body);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-ground);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ==========================================================================
   Motion Layer — CSS Animation Choreography (Anti-Slop Compliant)
   ========================================================================== */
@keyframes fadeSlideUp {
  0% {
    opacity: 0;
    transform: translateY(18px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-title {
  animation: fadeSlideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both;
}

.hero-lead {
  animation: fadeSlideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

.hero-context {
  animation: fadeSlideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
}

.metric-item:nth-child(1) { animation: fadeSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both; }
.metric-item:nth-child(2) { animation: fadeSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.38s both; }
.metric-item:nth-child(3) { animation: fadeSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.46s both; }
.metric-item:nth-child(4) { animation: fadeSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.54s both; }

.ledger-row {
  animation: fadeSlideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-timeline: view();
  animation-range: entry 5% cover 30%;
}

.menu-tier {
  animation: fadeSlideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-timeline: view();
  animation-range: entry 5% cover 30%;
}

.standard-entry {
  animation: fadeSlideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-timeline: view();
  animation-range: entry 5% cover 30%;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ==========================================================================
   Header Rail (No Hairlines, Pure Fill)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(10, 12, 16, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 1.1rem var(--page-margin);
}

.header-inner {
  max-width: var(--content-max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-group {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.brand-subtitle {
  font-size: var(--step-small);
  color: var(--text-muted);
  font-weight: 500;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: var(--step-small);
  color: var(--accent-green);
  font-weight: 600;
  background-color: var(--accent-green-bg);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-green);
  animation: pulse-ring 2s infinite ease-in-out;
}

@keyframes pulse-ring {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.clock-display {
  color: var(--text-lead);
  margin-left: 0.35rem;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.85rem;
  font-size: var(--step-small);
  font-weight: 600;
  color: var(--text-muted);
}

.site-nav a:hover {
  color: var(--text-primary);
}

.nav-contact-btn {
  background-color: var(--bg-surface-elevated);
  padding: 0.45rem 1rem;
  border-radius: 4px;
  color: var(--text-primary) !important;
  transition: background-color 0.2s ease;
}

.nav-contact-btn:hover {
  background-color: var(--bg-surface-highlight);
}

/* ==========================================================================
   Main Shell & Section Spacing
   ========================================================================== */
.main-content {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 var(--page-margin);
}

section {
  padding: 6.5rem 0;
}

.block-intro {
  margin-bottom: 3.5rem;
  max-width: 760px;
}

.block-heading {
  font-size: var(--step-h2);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.85rem;
  color: var(--text-primary);
}

.block-subheading {
  font-size: var(--step-lead);
  color: var(--text-muted);
  line-height: 1.5;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-block {
  padding: 7.5rem 0 6rem;
}

.hero-wrapper {
  max-width: 920px;
}

.hero-title {
  font-size: var(--step-head);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--text-primary);
  margin-bottom: 1.75rem;
}

.hero-lead {
  font-size: var(--step-lead);
  font-weight: 500;
  color: var(--text-lead);
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

.hero-context {
  font-size: var(--step-body);
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 3.25rem;
  max-width: 780px;
}

/* Metrics Strip */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  background-color: var(--bg-surface);
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 3.25rem;
}

.metric-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.metric-val {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--text-primary);
  line-height: 1;
}

.metric-label {
  font-size: var(--step-small);
  color: var(--text-muted);
  font-weight: 500;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--text-primary);
  color: var(--text-inverse);
  font-weight: 700;
  font-size: var(--step-body);
  padding: 0.95rem 1.85rem;
  border-radius: 6px;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.primary-action:hover {
  background-color: #ffffff;
  transform: translateY(-2px);
}

.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-surface);
  color: var(--text-primary);
  font-weight: 600;
  font-size: var(--step-body);
  padding: 0.95rem 1.85rem;
  border-radius: 6px;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.secondary-action:hover {
  background-color: var(--bg-surface-elevated);
  transform: translateY(-2px);
}

/* ==========================================================================
   The Work Ledger & Image Previews
   ========================================================================== */
.ledger-stack {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.ledger-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2.5rem;
  background-color: var(--bg-surface);
  border-radius: 8px;
  padding: 2.75rem 2.5rem;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.ledger-row:hover {
  background-color: var(--bg-surface-elevated);
  transform: translateY(-2px);
}

.ledger-aside {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  align-items: flex-start;
}

.row-identifier {
  font-size: var(--step-small);
  font-weight: 700;
  color: var(--accent-amber);
}

.row-domain {
  font-size: var(--step-small);
  color: var(--text-muted);
  font-weight: 500;
}

.row-status-tag {
  font-size: var(--step-small);
  font-weight: 600;
  color: var(--accent-green);
  background-color: var(--accent-green-bg);
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
}

.ledger-main {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.row-title {
  font-size: var(--step-h3);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  line-height: 1.2;
}

.row-summary {
  font-size: var(--step-body);
  color: var(--text-muted);
  line-height: 1.6;
}

/* Real Screenshot Preview Frame */
.row-preview-wrap {
  width: 100%;
  border-radius: 6px;
  overflow: hidden;
  background-color: #000;
}

.row-preview-img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  transition: transform 0.4s ease;
}

.ledger-row:hover .row-preview-img {
  transform: scale(1.02);
}

.row-tech-data {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background-color: rgba(10, 12, 16, 0.7);
  padding: 1.15rem 1.35rem;
  border-radius: 6px;
  font-size: var(--step-small);
  line-height: 1.55;
  color: var(--text-muted);
}

.row-tech-data strong {
  color: var(--text-lead);
}

.row-actions {
  margin-top: 0.35rem;
}

.external-anchor {
  display: inline-flex;
  align-items: center;
  font-size: var(--step-body);
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 5px;
  transition: color 0.15s ease;
}

.external-anchor:hover {
  color: var(--accent-amber);
}

/* ==========================================================================
   Fixed-Price Menu
   ========================================================================== */
.pricing-menu {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.menu-tier {
  background-color: var(--bg-surface);
  border-radius: 8px;
  padding: 2.75rem 2.25rem;
  display: flex;
  flex-direction: column;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.menu-tier:hover {
  background-color: var(--bg-surface-elevated);
  transform: translateY(-2px);
}

.menu-tier.highlighted {
  background-color: var(--bg-surface-elevated);
}

.tier-lead {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.35rem;
}

.tier-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.tier-cost {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.tier-cost .figure {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  line-height: 1;
}

.tier-cost .cadence {
  font-size: var(--step-small);
  color: var(--accent-amber);
  font-weight: 600;
}

.tier-explanation {
  font-size: var(--step-body);
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1.75rem;
  min-height: 4.8rem;
}

.tier-deliverables {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 2.5rem;
  flex-grow: 1;
}

.tier-deliverables li {
  font-size: var(--step-small);
  color: var(--text-lead);
  line-height: 1.5;
  padding-left: 1.25rem;
  position: relative;
}

.tier-deliverables li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--text-subtle);
}

.tier-cta-wrap {
  margin-top: auto;
}

.tier-select-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.85rem 1.25rem;
  background-color: var(--bg-surface-highlight);
  color: var(--text-primary);
  font-weight: 700;
  font-size: var(--step-body);
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.tier-select-btn:hover {
  background-color: #2e3648;
}

.tier-select-btn.primary-tier {
  background-color: var(--text-primary);
  color: var(--text-inverse);
}

.tier-select-btn.primary-tier:hover {
  background-color: #ffffff;
}

/* ==========================================================================
   Engineering Standards
   ========================================================================== */
.standards-list {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.standard-entry {
  background-color: var(--bg-surface);
  border-radius: 8px;
  padding: 2.5rem;
}

.entry-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.entry-body {
  font-size: var(--step-body);
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 820px;
}

/* ==========================================================================
   Contact Block
   ========================================================================== */
.contact-block {
  padding-bottom: 8rem;
}

.contact-card {
  background-color: var(--bg-surface);
  border-radius: 12px;
  padding: 4.5rem 3rem;
  text-align: center;
  max-width: 840px;
  margin: 0 auto;
}

.contact-title {
  font-size: var(--step-h2);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.contact-desc {
  font-size: var(--step-lead);
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 2.75rem;
  line-height: 1.55;
}

.contact-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.35rem;
  margin-bottom: 3rem;
}

.contact-primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.25rem;
  background-color: var(--text-primary);
  color: var(--text-inverse);
  font-weight: 700;
  font-size: var(--step-body);
  border-radius: 6px;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.contact-primary-btn:hover {
  background-color: #ffffff;
  transform: translateY(-2px);
}

.contact-secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.25rem;
  background-color: var(--bg-surface-elevated);
  color: var(--text-primary);
  font-weight: 700;
  font-size: var(--step-body);
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.contact-secondary-btn:hover {
  background-color: var(--bg-surface-highlight);
  transform: translateY(-2px);
}

.contact-meta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.95rem;
  font-size: var(--step-small);
  color: var(--text-muted);
}

.contact-meta-row a {
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  padding: 3rem var(--page-margin);
  background-color: var(--bg-ground);
}

.footer-inner {
  max-width: var(--content-max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  font-size: var(--step-small);
  color: var(--text-muted);
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.footer-nav a:hover {
  color: var(--text-primary);
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 960px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pricing-menu {
    grid-template-columns: 1fr;
  }
  .ledger-row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 680px) {
  .header-status {
    display: none;
  }
  .site-nav a:not(.nav-contact-btn) {
    display: none;
  }
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  .hero-cta-group {
    flex-direction: column;
    align-items: stretch;
  }
  .contact-buttons {
    flex-direction: column;
    width: 100%;
  }
  .contact-primary-btn, .contact-secondary-btn {
    width: 100%;
  }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }
}
