/* ═══════════════════════════════════════════════
   Phoenix Platform — Shared Styles
   ═══════════════════════════════════════════════ */

:root {
  --bg-primary: #0a0a0c;
  --bg-secondary: #111115;
  --bg-card: #16161b;
  --bg-card-hover: #1c1c22;
  --text-primary: #f0ece4;
  --text-secondary: #9a9690;
  --text-muted: #5c5955;
  --accent: #e8913a;
  --accent-light: #f4b76e;
  --accent-glow: rgba(232, 145, 58, 0.15);
  --accent-deep: #c06a1a;
  --ember: #d4442a;
  --teal: #3abdb5;
  --border: rgba(240, 236, 228, 0.06);
  --border-accent: rgba(232, 145, 58, 0.2);
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --max-w: 1200px;
  --max-w-narrow: 840px;
  --section-pad: 140px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: var(--accent);
  color: var(--bg-primary);
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-light); }

/* ─── NAV ─── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 48px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 10, 12, 0.75);
  backdrop-filter: blur(24px) saturate(1.2);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.nav-logo svg { width: 32px; height: 32px; }

.nav-logo span {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

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

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
  box-shadow: 0 0 0 0 var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-light);
  color: var(--bg-primary);
  box-shadow: 0 0 40px 8px var(--accent-glow);
  transform: translateY(-1px);
}

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

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

.btn-nav {
  padding: 9px 22px;
  font-size: 0.85rem;
}

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

.btn-outline:hover {
  background: var(--accent-glow);
  color: var(--accent-light);
}

/* ─── PAGE SECTIONS ─── */
section {
  padding: var(--section-pad) 48px;
  position: relative;
}

.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.section-narrow {
  max-width: var(--max-w-narrow);
  margin: 0 auto;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-label::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--accent);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  max-width: 700px;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 600px;
  line-height: 1.7;
  font-weight: 300;
  margin-bottom: 60px;
}

/* ─── PAGE HERO (subpages) ─── */
.page-hero {
  padding: 160px 48px 80px;
  position: relative;
  overflow: hidden;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.page-hero .hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.page-hero .hero-bg::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 700px;
  height: 700px;
  background: radial-gradient(ellipse, rgba(232, 145, 58, 0.06) 0%, transparent 70%);
}

.page-hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
}

.page-hero .breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-hero .breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.page-hero .breadcrumb a:hover { color: var(--accent); }

.page-hero .breadcrumb .sep { opacity: 0.4; }

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
  max-width: 700px;
}

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

.page-hero .lead {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 580px;
  line-height: 1.7;
  font-weight: 300;
}

/* ─── PROSE CONTENT ─── */
.prose {
  max-width: var(--max-w-narrow);
  margin: 0 auto;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.85;
}

.prose h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--text-primary);
  margin: 64px 0 20px;
  letter-spacing: -0.01em;
}

.prose h2:first-child { margin-top: 0; }

.prose h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 40px 0 12px;
}

.prose p {
  margin-bottom: 20px;
}

.prose strong {
  color: var(--text-primary);
  font-weight: 600;
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: rgba(232, 145, 58, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--accent-light);
  border: 1px solid rgba(232, 145, 58, 0.1);
}

.prose pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  overflow-x: auto;
  margin: 24px 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.prose pre code {
  background: none;
  padding: 0;
  border: none;
  color: inherit;
}

.prose ul, .prose ol {
  margin: 16px 0 24px 24px;
}

.prose li {
  margin-bottom: 8px;
}

.prose blockquote {
  border-left: 3px solid var(--accent);
  padding: 16px 24px;
  margin: 28px 0;
  background: var(--accent-glow);
  border-radius: 0 10px 10px 0;
  font-style: italic;
  color: var(--text-primary);
}

.prose .callout {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 28px;
  margin: 28px 0;
}

.prose .callout-title {
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.prose hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 48px 0;
}

.prose figure {
  margin: 32px 0;
  text-align: center;
}

.prose figcaption {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 12px;
}

/* ─── CARDS GRID ─── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.cards-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.card {
  padding: 36px 32px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
}

.card:hover {
  border-color: var(--border-accent);
  transform: translateY(-4px);
  color: inherit;
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.4rem;
  background: var(--accent-glow);
  border: 1px solid var(--border-accent);
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.card .card-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.card .card-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  background: rgba(232, 145, 58, 0.08);
  color: var(--accent-light);
  border: 1px solid rgba(232, 145, 58, 0.1);
}

.card .arrow {
  position: absolute;
  bottom: 32px;
  right: 32px;
  color: var(--text-muted);
  font-size: 1.2rem;
  transition: all 0.3s;
}

.card:hover .arrow {
  color: var(--accent);
  transform: translateX(4px);
}

/* ─── TABLE ─── */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  margin: 28px 0;
}

.data-table th, .data-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

.data-table th {
  background: rgba(255,255,255,0.02);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.data-table td { color: var(--text-secondary); }
.data-table tr:last-child td { border-bottom: none; }

/* ─── FORM ─── */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}

.form-group select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239a9690' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* ─── FOOTER ─── */
footer {
  padding: 60px 48px 40px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 48px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 12px;
  max-width: 280px;
  line-height: 1.5;
}

.footer-links {
  display: flex;
  gap: 64px;
}

.footer-col h5 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.footer-col a {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  margin-bottom: 8px;
  transition: color 0.2s;
}

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

.footer-bottom {
  max-width: var(--max-w);
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer-bottom a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-bottom a:hover { color: var(--text-secondary); }

/* ─── SCROLL ANIMATIONS ─── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ─── TAGS ─── */
.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  background: rgba(240, 236, 228, 0.04);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.tag-accent {
  background: rgba(232, 145, 58, 0.08);
  color: var(--accent-light);
  border-color: rgba(232, 145, 58, 0.1);
}

/* ─── TIMELINE ─── */
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--border));
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -36px;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-primary);
}

.timeline-item h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.timeline-item .date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 8px;
}

.timeline-item p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ─── JOB LISTING ─── */
.job-card {
  padding: 28px 32px;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s;
  text-decoration: none;
  color: inherit;
}

.job-card:hover {
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
  color: inherit;
}

.job-info h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.job-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ─── DIVIDER ─── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 48px 0;
}

/* ─── STAT ROW ─── */
.stat-row {
  display: flex;
  gap: 48px;
  padding: 40px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 48px 0;
}

.stat-item .num {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 500;
  color: var(--accent);
  display: block;
  margin-bottom: 4px;
}

.stat-item .label {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ─── DIAGRAM BOX ─── */
.diagram-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  margin: 32px 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.9;
  color: var(--text-secondary);
  overflow-x: auto;
}

.diagram-box .hl-accent { color: var(--accent); }
.diagram-box .hl-teal { color: var(--teal); }
.diagram-box .hl-ember { color: var(--ember); }
.diagram-box .hl-dim { color: var(--text-muted); }

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .cards-grid { grid-template-columns: 1fr 1fr; }
  .stat-row { gap: 32px; flex-wrap: wrap; }
}

@media (max-width: 768px) {
  :root { --section-pad: 80px; }
  nav { padding: 0 20px; }
  section, .page-hero { padding-left: 20px; padding-right: 20px; }
  .page-hero { padding-top: 120px; padding-bottom: 60px; }
  .cards-grid, .cards-grid-2 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .stat-row { flex-direction: column; gap: 24px; }
  .job-card { flex-direction: column; align-items: flex-start; gap: 16px; }
  footer { padding: 40px 20px 24px; }
  .footer-inner { flex-direction: column; }
  .footer-links { gap: 32px; flex-wrap: wrap; }
  .footer-bottom { flex-direction: column; gap: 8px; }
}
