/* ============================================
   Jean-Baptiste Stevenard — Design tokens
   ============================================ */
:root {
  --ink: #14181F;
  --ink-soft: #2A303C;
  --paper: #F7F7F5;
  --paper-raised: #FFFFFF;
  --slate: #5B6472;
  --slate-light: #8891A0;
  --signal: #1E3FE0;      /* career / employee track */
  --signal-soft: #E4E9FD;
  --signal-dark: #172F9E;
  --current: #0F9D6C;     /* independent / current track */
  --current-soft: #DCF5EA;
  --current-dark: #0B7B56;
  --line: #DCDFE3;
  --line-soft: #EAEBEE;

  --font-display: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', 'SF Mono', Consolas, monospace;

  --container: 1080px;
  --radius: 6px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 0.5em;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.25rem, 4vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; color: var(--ink-soft); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate);
  margin: 0 0 0.75em;
  display: block;
}

.lede {
  font-size: 1.2rem;
  color: var(--slate);
  max-width: 60ch;
}

/* ============================================
   Header / Nav
   ============================================ */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--ink);
  transition: color 0.15s ease;
}
.logo:hover { color: var(--signal); }

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  font-size: 0.92rem;
  color: var(--slate);
  transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--signal);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  margin: 4px 0;
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--paper-raised);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { border-bottom: 1px solid var(--line-soft); }
  .nav-links a { display: block; padding: 14px 32px; }
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary { background: var(--signal); color: #fff; }
.btn-primary:hover { background: var(--signal-dark); }

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-secondary:hover { border-color: var(--signal); color: var(--signal); }

.btn-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 1.75em; }

/* ============================================
   Sections
   ============================================ */
section { padding: 96px 0; }
section.tight { padding: 64px 0; }
.section-head { max-width: 640px; margin-bottom: 48px; }

.divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0;
}

/* ============================================
   Hero
   ============================================ */
.hero {
  padding: 88px 0 80px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.hero-photo {
  width: 100%;
  aspect-ratio: 4/5;
  background: var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }

.hero-credibility {
  margin-top: 1.5em;
  padding-top: 1.5em;
  border-top: 1px solid var(--line);
  color: var(--slate);
  font-size: 0.98rem;
  max-width: 52ch;
}

.hero-credibility strong { color: var(--ink); font-weight: 600; }

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { max-width: 260px; }
}

/* ============================================
   App preview cards (homepage strip)
   ============================================ */
.app-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.app-card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.app-card:hover { border-color: var(--signal); transform: translateY(-2px); }

.app-icon {
  width: 56px;
  height: 56px;
  border-radius: 13px;
  background: var(--line-soft);
  margin-bottom: 16px;
  border: 1px solid var(--line);
  overflow: hidden;
}

.app-card h3 { margin-bottom: 0.3em; }
.app-card p { font-size: 0.92rem; margin-bottom: 0.5em; }
.app-rating {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--current-dark);
  font-weight: 500;
}

@media (max-width: 760px) {
  .app-strip { grid-template-columns: 1fr; }
}

/* ============================================
   Stats strip
   ============================================ */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: left;
}
.stat .num {
  font-family: var(--font-mono);
  font-size: 2rem;
  color: var(--signal);
  display: block;
}
.stat.stat-indie .num { color: var(--current-dark); }
.stat .label {
  font-size: 0.85rem;
  color: var(--slate);
}

@media (max-width: 760px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
  margin-top: 64px;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.85rem;
  color: var(--slate);
}
.footer-links a { text-decoration: none; color: var(--slate); transition: color 0.15s ease; }
.footer-links a:hover { color: var(--signal); }
.footer-meta { font-size: 0.85rem; color: var(--slate-light); }

/* ============================================
   Page hero (interior pages)
   ============================================ */
.page-hero {
  padding: 72px 0 56px;
}
.page-hero .lede { margin-top: 0.4em; }

/* ============================================
   App detail cards (apps.html)
   ============================================ */
.app-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.app-detail-card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  transition: border-color 0.15s ease;
}
.app-detail-card:hover { border-color: var(--signal); }

.app-detail-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.app-detail-head .app-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 0;
  flex-shrink: 0;
  overflow: hidden;
}
.app-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }

.app-detail-head h3 { margin-bottom: 0.2em; }
.app-detail-head .tagline { font-size: 0.9rem; color: var(--slate); margin: 0; }

.screenshot-strip {
  display: flex;
  gap: 10px;
  margin: 18px 0;
}
.screenshot-strip .shot {
  flex: 1;
  aspect-ratio: 9/19.5;
  background: var(--line-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }

.app-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 18px 0;
  padding: 16px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.app-meta .meta-item .meta-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate-light);
  margin-bottom: 4px;
}
.app-meta .meta-item .meta-value { font-size: 0.88rem; color: var(--ink-soft); }
.app-meta .meta-item .meta-value.meta-rating { color: var(--current-dark); font-weight: 600; }

.app-tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}
.app-tech-tags span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 4px 9px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--slate);
}

@media (max-width: 820px) {
  .app-grid { grid-template-columns: 1fr; }
  .app-meta { grid-template-columns: 1fr 1fr; }
}

/* ============================================
   Process steps (philosophy.html)
   ============================================ */
.process-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.process-step {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--line-soft);
}
.process-step:last-child { border-bottom: 1px solid var(--line-soft); }
.process-step .step-num {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--slate-light);
}
.process-step h3 { margin-bottom: 0.35em; }
.process-step p { margin-bottom: 0; max-width: 60ch; }

/* ============================================
   Tech grid (tech.html)
   ============================================ */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}
.tech-badge {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  text-align: left;
  transition: border-color 0.15s ease;
}
.tech-badge:hover { border-color: var(--signal); }
.tech-badge .tech-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  display: block;
  margin-bottom: 4px;
}
.tech-badge .tech-role {
  font-size: 0.82rem;
  color: var(--slate);
}

/* ============================================
   Timeline (timeline.html)
   ============================================ */
.timeline-legend {
  display: flex;
  gap: 24px;
  margin-bottom: 40px;
  font-size: 0.85rem;
  color: var(--slate);
}
.timeline-legend .dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 8px;
}
.dot-career { background: var(--signal); }
.dot-indie { background: var(--current); }

.timeline-track {
  position: relative;
  padding-left: 28px;
  border-left: 2px solid var(--line);
}

.timeline-entry {
  position: relative;
  padding-bottom: 36px;
}
.timeline-entry:last-child { padding-bottom: 0; }

.timeline-entry::before {
  content: '';
  position: absolute;
  left: -34px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--paper);
  background: var(--signal);
}
.timeline-entry.indie::before { background: var(--current); }

.timeline-entry .t-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--slate-light);
  display: block;
  margin-bottom: 4px;
}
.timeline-entry h3 { margin-bottom: 0.2em; font-size: 1.1rem; }
.timeline-entry .t-place { font-size: 0.85rem; color: var(--slate); margin-bottom: 0.4em; }
.timeline-entry p.t-desc { margin-bottom: 0; font-size: 0.92rem; }

.timeline-entry.indie h3 { color: var(--current); }
.timeline-entry.now::before {
  background: var(--current);
  box-shadow: 0 0 0 4px var(--current-soft);
}

/* ============================================
   Contact (contact.html)
   ============================================ */
.contact-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.contact-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.contact-item:hover { border-color: var(--signal); transform: translateY(-2px); }
.contact-item:hover .arrow { color: var(--signal); }
.contact-item-static { cursor: default; }
.contact-item-static:hover { border-color: var(--line); transform: none; }
.contact-item .contact-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate);
  display: block;
  margin-bottom: 4px;
}
.contact-item .contact-value { font-size: 1.02rem; font-weight: 500; }
.contact-item .arrow { color: var(--slate-light); font-size: 1.2rem; transition: color 0.15s ease; }

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

/* ============================================
   Legal / prose pages
   ============================================ */
.prose { max-width: 72ch; }
.prose a { color: var(--signal); text-decoration: underline; text-decoration-color: var(--signal-soft); text-underline-offset: 2px; }
.prose a:hover { text-decoration-color: var(--signal); }
.prose h2 { margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.4em; font-size: 1.05rem; }
.prose ul { color: var(--ink-soft); padding-left: 1.2em; }
.prose li { margin-bottom: 0.5em; }
.prose .updated { font-size: 0.85rem; color: var(--slate-light); margin-bottom: 2.5em; }

/* ============================================
   About page
   ============================================ */
.about-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 56px;
  align-items: start;
}
.about-photo {
  width: 100%;
  aspect-ratio: 4/5;
  background: var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  position: sticky;
  top: 96px;
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-story p { font-size: 1.05rem; }
.about-story p:first-of-type {
  font-size: 1.2rem;
  color: var(--ink-soft);
}

@media (max-width: 820px) {
  .about-layout { grid-template-columns: 1fr; }
  .about-photo { max-width: 260px; position: static; }
}

.book-cover {
  width: 100%;
  aspect-ratio: 5/8;
  background: var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  position: sticky;
  top: 96px;
}
.book-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (max-width: 820px) {
  .book-cover { max-width: 320px; position: static; }
}

/* ============================================
   Career archive (unlisted page)
   ============================================ */
.archive-nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 1.5em;
}
.archive-nav a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate);
  text-decoration: none;
}
.archive-nav a:hover { color: var(--signal); }

.archive-section { scroll-margin-top: 96px; }
.archive-intro { max-width: 68ch; }

.archive-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line-soft);
  margin-top: 24px;
}
.archive-entry {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}
.archive-entry .a-year {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--slate-light);
}
.archive-entry.no-year { grid-template-columns: 1fr auto; }
.archive-entry .a-name { font-weight: 500; color: var(--ink); text-decoration: none; }
.archive-entry a.a-name:hover { color: var(--signal); }
.archive-entry .a-note { display: block; font-size: 0.85rem; color: var(--slate); margin-top: 2px; }
.archive-entry .a-note a { color: var(--signal); text-decoration: underline; text-decoration-color: var(--signal-soft); }
.archive-entry .a-note a:hover { text-decoration-color: var(--signal); }

.archive-status {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.archive-status.live { background: var(--current-soft); color: var(--current-dark); }
.archive-status.retired { background: var(--line-soft); color: var(--slate); }

.archive-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.archive-tags span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 6px 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--ink-soft);
}

@media (max-width: 600px) {
  .archive-entry { grid-template-columns: 44px 1fr; }
  .archive-entry.no-year { grid-template-columns: 1fr; }
  .archive-status { grid-column: 2; justify-self: start; margin-top: 4px; }
  .archive-entry.no-year .archive-status { grid-column: 1; }
}

/* ============================================
   Utilities
   ============================================ */
.bg-raised { background: var(--paper-raised); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
