/* ==========================================================================
   home.css — rules used only by index.html
   Hero, about, cards, visualisations, writing list, currently, contact.
   Requires theme.css and base.css to be loaded first.
   ========================================================================== */

/* --- LAYOUT -------------------------------------------------------------- */

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

section { padding: 72px 0; }
section + section { border-top: 1px solid var(--rule); }

.section-tag {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-tag::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.section-note {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.7;
  margin: -18px 0 26px;
}

/* --- HERO ---------------------------------------------------------------- */

.hero { padding-top: 136px; padding-bottom: 72px; }

.hero-eyebrow {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-eyebrow::before {
  content: '';
  display: block;
  width: 22px;
  height: 1px;
  background: var(--accent);
}

.hero-headline {
  font-family: var(--serif);
  font-size: clamp(34px, 6.5vw, 52px);
  line-height: 1.1;
  font-weight: 400;
  color: var(--navy);
  margin-bottom: 28px;
  letter-spacing: -0.01em;
}

.hero-headline em { font-style: italic; color: var(--accent); }

.hero-body {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.78;
  max-width: 540px;
  margin-bottom: 20px;
}

.hero-body:last-of-type { margin-bottom: 36px; }
.hero-body strong { color: var(--navy); font-weight: 400; }

.hero-quote {
  margin: 0 0 32px;
  padding-left: 18px;
  border-left: 2px solid var(--accent);
}

.hero-quote-text {
  font-size: 15px;
  font-weight: 300;
  color: var(--accent);
  letter-spacing: 0.01em;
  line-height: 1.5;
}

.hero-quote-attr {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.06em;
  margin-top: 5px;
}

/* Sparkline */
.spark-wrap { margin: 28px 0 32px; height: 60px; }
#spark { width: 100%; height: 60px; overflow: visible; }

.spark-path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.5;
}

.spark-label {
  font-size: 10px;
  font-family: var(--sans);
  fill: var(--faint);
  letter-spacing: 0.06em;
}

/* --- CTAs ---------------------------------------------------------------- */

.cta-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  background: var(--navy);
  color: #F7F5F0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: 2px;
  transition: background 0.2s;
}

.cta-primary:hover { background: var(--navy-hi); }

.cta-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border: 1px solid var(--faint);
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: 2px;
  transition: border-color 0.2s, color 0.2s;
}

.cta-ghost:hover { border-color: var(--navy); color: var(--navy); }

/* --- ABOUT --------------------------------------------------------------- */

.about-hero {
  display: flex;
  gap: 36px;
  align-items: flex-start;
  margin-bottom: 36px;
}

.about-photo-wrap {
  flex-shrink: 0;
  width: 130px;
  height: 156px;
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid var(--rule);
  background: var(--bg3);
  box-shadow: 0 2px 12px rgba(27, 42, 74, 0.08);
}

.about-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.about-body {
  font-size: 15.5px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 16px;
}

.about-body strong { color: var(--navy); font-weight: 400; }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 32px;
}

.about-stat {
  background: var(--bg2);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 20px;
  border-top: 3px solid var(--accent);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.about-stat-val {
  font-family: var(--serif);
  font-size: 28px;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 8px;
}

.about-stat-label {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.45;
  text-wrap: pretty;
}

/* Tools strip — replaces the old self-rated skills grid */
.tools {
  margin-top: 32px;
  padding: 18px 20px;
  background: var(--bg2);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 3px;
}

.tools-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 10px;
}

.tools-list {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.9;
}

.tools-list strong { color: var(--navy); font-weight: 400; }

/* --- CARDS --------------------------------------------------------------- */

.card {
  background: var(--bg2);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 24px;
  margin-bottom: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
  text-decoration: none;
  display: block;
  color: inherit;
}

.card:hover { border-color: var(--navy); box-shadow: var(--shadow); }

.card-meta {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.card-meta .dot { color: var(--faint); }

.card-title {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 400;
  color: var(--navy);
  line-height: 1.3;
  margin-bottom: 10px;
}

.card-body { font-size: 14px; color: var(--muted); line-height: 1.75; }
.card-body + .card-body { margin-top: 10px; }

.card-doi {
  color: var(--accent2);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 2px;
  font-weight: 400;
  white-space: nowrap;
  margin-top: 8px;
}

.card-tags { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 6px; }

.card-status {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 2px;
  margin-left: auto;
}

.status-live { background: rgba(200, 149, 108, 0.12); color: var(--accent2); border: 1px solid rgba(200, 149, 108, 0.3); }
.status-wip  { background: var(--bg3); color: var(--muted); border: 1px solid var(--rule); }

/* --- VISUALISATIONS ------------------------------------------------------ */

.viz-embed {
  background: var(--bg2);
  border: 1px solid var(--rule);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 12px;
}

.viz-embed iframe { width: 100%; display: block; border: none; }

.viz-caption {
  font-size: 12px;
  color: var(--muted);
  padding: 12px 16px;
  border-top: 1px solid var(--rule);
  line-height: 1.6;
}

.viz-caption strong { color: var(--navy); font-weight: 400; }

.viz-figure {
  margin-bottom: 12px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--bg2);
  padding: 14px;
}

.viz-figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 2px;
  max-height: 520px;
  object-fit: contain;
  background: var(--bg2);
}

.viz-link { color: var(--accent2); text-decoration: none; font-weight: 400; }
.viz-link:hover { color: var(--navy); }

/* --- WRITING ------------------------------------------------------------- */

.writing-item {
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}

.writing-item:first-child { padding-top: 0; }
.writing-item:hover { opacity: 0.7; }

.writing-date {
  font-size: 12px;
  color: var(--faint);
  white-space: nowrap;
  padding-top: 3px;
  min-width: 84px;
}

.writing-title {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--navy);
  line-height: 1.3;
  margin-bottom: 5px;
}

.writing-desc { font-size: 13px; color: var(--muted); line-height: 1.65; }

/* --- CURRENTLY ----------------------------------------------------------- */

.now-list { list-style: none; }

.now-item {
  display: flex;
  gap: 16px;
  align-items: baseline;
  padding: 13px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 14px;
}

.now-item:last-child { border-bottom: none; }

.now-label {
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  min-width: 72px;
  font-weight: 500;
}

.now-text { color: var(--muted); }
.now-text strong { color: var(--navy); font-weight: 400; }

/* --- CONTACT ------------------------------------------------------------- */

.contact-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.contact-heading {
  font-family: var(--serif);
  font-size: clamp(24px, 4vw, 28px);
  line-height: 1.2;
  font-weight: 400;
  color: var(--navy);
  margin-bottom: 16px;
}

.contact-body {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 16px;
}

.contact-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 13px 22px;
  background: var(--navy);
  color: #F7F5F0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: 2px;
  margin: 28px 0 20px;
  transition: background 0.2s;
}

.contact-btn:hover { background: var(--navy-hi); }

.contact-socials { display: flex; gap: 20px; margin-top: 16px; }

.contact-social-link {
  font-size: 14px;
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: var(--faint);
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.contact-social-link:hover { color: var(--navy); }

/* --- MOBILE -------------------------------------------------------------- */

@media (max-width: 540px) {
  .about-grid   { grid-template-columns: 1fr 1fr; }
  .writing-item { flex-direction: column; gap: 4px; }
  .writing-date { min-width: auto; }
}

@media (max-width: 400px) {
  .about-hero { flex-direction: column; }
  .about-grid { grid-template-columns: 1fr; }
  .cta-row    { flex-direction: column; align-items: flex-start; }
}
