/* ============================================================
   home.css — home page only.
   Loaded AFTER freelance.css, which provides the design system
   (tokens, .topnav, .hero, .btn, section, .card-list, .card,
   .case-study, .stats, .cta-section, .site-footer, dark mode).
   This file adds: hero two-column + portrait, trust strip,
   timeline restyle of the activity feed, footer social row.
   ============================================================ */

/* ---------- Top nav: widen to match the wide hero ----------
   Sticky behaviour, left-aligned brand, nav CTA button and the
   mobile wrap rules now live in freelance.css (shared by all
   three pages). Only the width override is home-specific. */
.topnav .wrap { max-width: 1040px; }

/* sticky header would otherwise hide the anchor-target headings */
#what-i-do,
#experience { scroll-margin-top: 84px; }

/* ---------- Hero: two-column ---------- */
/* freelance .wrap is 780px — widen just the hero so text + portrait fit */
.hero .wrap {
  max-width: 1040px;
  display: flex;
  align-items: flex-start;
  gap: 52px;
}
.hero-text {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 620px;
}
.hero-portrait {
  flex: 0 0 320px;
  margin: 6px 0 0;
  position: sticky;
  /* clear the sticky header (~87px) so the image never slides under it */
  top: 100px;
}
.hero-portrait img {
  display: block;
  width: 320px;
  height: 380px;
  object-fit: cover;
  object-position: 50% 18%;
  border-radius: 10px;
  border: 1px solid var(--color-border);
}

/* availability pill — reuse the warm eyebrow look but as a status chip */
.availability {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
  background: var(--color-accent-soft);
  padding: 6px 14px;
  border-radius: 999px;
  text-decoration: none;
  margin-bottom: 22px;
}
.availability:hover { color: var(--color-accent-dark); }
.availability .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3aa655;
  box-shadow: 0 0 0 0 rgba(58, 166, 85, .55);
  animation: pulse 2s infinite;
  flex-shrink: 0;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(58, 166, 85, .55); }
  70%  { box-shadow: 0 0 0 7px rgba(58, 166, 85, 0); }
  100% { box-shadow: 0 0 0 0 rgba(58, 166, 85, 0); }
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 30px;
}
.hero-actions .text-link {
  font-weight: 700;
  font-size: 15px;
}

/* ---------- Trust strip (plain text) ---------- */
.trust {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--color-border);
  font-size: 15px;
  color: var(--color-text-muted);
}
.trust strong { color: var(--color-text); font-weight: 700; }

/* ---------- "Read the full case study" link inside the panel ---------- */
.case-study-panel .case-link {
  display: inline-block;
  margin-top: 18px;
  font-weight: 700;
  font-size: 15px;
}

/* ---------- Activity feed → timeline ---------- */
.timeline {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  max-width: 640px;
}
/* the Knockout template renders a .tweet + <hr> per item;
   neutralise the old bubble styling */
#tweet_column {
  width: auto;
  max-width: 640px;
  margin: 8px 0 0;
  padding: 0;
  height: auto;
}
#tweet_column .tweet {
  display: block;
  width: auto;
  max-width: none;
  padding: 18px 0;
  background: none;
  box-shadow: none;
  border-radius: 0;
}
#tweet_column hr {
  border-top: 1px solid var(--color-border);
  margin: 0;
}
#tweet_column .type { display: none; }         /* hide the coloured category tab */
#tweet_column .tweet_image {
  float: left;
  width: 36px;
  height: 36px;
  padding: 0;
  margin: 3px 16px 0 0;
}
#tweet_column .tweet_image img {
  width: 36px !important;
  height: 36px !important;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: #fff;
  filter: grayscale(1);
  opacity: 0.85;
}
#tweet_column .tweet_right {
  float: none;
  width: auto;
  overflow: hidden;
  padding: 0;
}
#tweet_column .tweet_screen_name a {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 700;
  color: var(--color-dark);
  text-align: left;
}
#tweet_column .tweet:hover .tweet_screen_name a { color: var(--color-accent-dark); }
#tweet_column .tweet_name {
  font-size: 14px;
  color: var(--color-text-muted);
}
#tweet_column .tweet_name a { font-size: 100%; }
#tweet_column .tweet_text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text);
  margin-top: 4px;
}
#tweet_column .tweet_text span span:before { content: "#"; color: var(--color-text-muted); }
#tweet_column .tweet:hover .tweet_text span span { color: var(--color-accent-dark); }
#tweet_column .tweet_date { margin-top: 6px; }
#tweet_column .tweet_date a { font-size: 13px; color: var(--color-text-muted); float: none; }

/* ---------- Earlier: research / theses ---------- */
.earlier-research {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--color-border);
  max-width: 640px;
}
.earlier-research p { font-size: 15px; color: var(--color-text-muted); }
.earlier-research strong { color: var(--color-text); font-weight: 700; }
.earlier-research .downloads {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
}
.earlier-research .downloads a {
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  color: var(--color-accent-dark);
}
.earlier-research .downloads a:hover { color: var(--color-accent); }
.earlier-research .downloads .fa { margin-right: 6px; }
.earlier-research .downloads .meta {
  font-weight: 400;
  font-size: 13px;
  color: var(--color-text-muted);
}

.after-timeline {
  margin-top: 24px;
  font-weight: 700;
  font-size: 15px;
}

/* Footer social row styling now lives in freelance.css (shared). */

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .hero .wrap {
    max-width: var(--max-width);
    flex-direction: column-reverse;   /* portrait ends up on top */
    align-items: flex-start;
    gap: 24px;
  }
  .hero-text { max-width: none; }
  .hero-portrait {
    position: static;                 /* undo desktop sticky */
    top: auto;
    align-self: center;
    flex-basis: auto;
    margin: 0;
  }
  .hero-portrait img {
    width: 200px;
    height: 236px;
    object-position: 50% 15%;
  }
  /* wrapped header is taller — push anchor targets clear of it */
  #what-i-do,
  #experience { scroll-margin-top: 120px; }
}

@media (max-width: 640px) {
  .hero-actions { gap: 14px; }
  .hero-actions .btn { display: block; width: 100%; text-align: center; }
}

@media (prefers-color-scheme: dark) {
  .hero-portrait img { border-color: var(--color-border); }
  .trust img { filter: grayscale(1) invert(1) brightness(1.4); opacity: 0.5; }
  #tweet_column .tweet_image img { filter: grayscale(1) invert(1) brightness(1.3); }
}
